Changing color of a string in listbox - MATLAB GUI - matlab

I have a list of names in a listbox. What I would like to do is have a certain selected name change color, from red to green, when I click a button.
Thank you

It is not supported officially. There are non-documented features that do it - check out http://www.undocumentedmatlab.com.

You might have already solved this, but I thought I would clarify Andrey just a bit. MATLAB GUI components can handle HTML in their properties. So, I imagine setting up your button callback to edit the properties of your listbox using HTML to change the color would be an appropriate way to proceed here. Yair Altman has a pretty good write up here: http://undocumentedmatlab.com/blog/html-support-in-matlab-uicomponents/
Granted, that example is simple, but you should be able to adapt it to fit your needs if I have understood your question correctly.

Related

Default Colour on Radio Buttons

I am putting together a simple form for a friend and they want when a button is selected to change from amber, too green.
I have attached PDF to give an idea of what I am looking for. Much like a data validation on excel, but for the life of me I cannot figure out how to do it.
Default: Amber
when clicked: Green
It is certainly possible with PDFs to do that since the appearance of a form field is defined by arbitrary drawing instructions.
However, whether you can do that with a PDF editor wholely depends on the capabilities of the PDF editor.

"Segmented Button" with Multi-line Text

I'm not sure exactly what keyword I should be searching, but I wasn't able to find the answer to my problem - I'm new to iOS development so apologies in advanced if I'm not using the correct UI components.
I want to create something like a segmented control (two choices) with multi-line descriptions in them, except I'm not sure if I should be using a segmented control to do so, or to customize a button to create it. The user should be able to select a "choice" and that will switch views and tint the choice not selected depending on the choice the user makes. How exactly would I design this / is this possible?
I've already attempted to modify the segmented control but couldn't get the desired results. I've thought about creating a text box and modifying it to act like a button selector, but wasn't sure if that was the best way. I would love some input, thanks!

Enable some component visibility in MATLAB GUI figure after a selection?

I have a simple question about matlab GUI?
how can i Enable some component visibility in MATLAB GUI figure? For an easy understanding i am using a fgure to explain my problem.
I wanted to do something like.
After Running my Gui. i wanted to show only a specific pushbutton rather all the components
as shown in Figure 1
Once i click on Lets ADD Button the figure 2 should appear
After selecting a number my Other Components should appear as shown in figure 3.
Sorry if my Words are misleading to you as i do not have a good command on technical words.
Thanks..........
You need to detect the event (i.e. press button) and create a function for that.
There you will need to enable the visibility of whatever you want like:
set(handles.pushbutton1,'visible','on')

How give style for GWT CellList in Onclick event?

I'm confused by the showcase example of Cell List. Shown below is a screenshot, when I inspect the element I can see a png image is used to give a blue background for the selected cell. I cannot find any reference to such an image or css file from its source code here or from google-code. I couldn't find any injection of css or things like that as mentioned in related sof answers. Please show me where the code is or some other example code. I'd like to know how this exact scenario works, not an alternate solution to get the effect. I'm pretty new to gwt, I'm sure this is a piece of cake for the veterans out here,any clues?
It's the default styling for the CellList. You can use your own by passing a CellList.Resources to the CellList constructor.

How can I add a picture into a placeholder using PowerPoint 2003 VBA?

I am trying to create PowerPoint slides using MATLAB. It seems like it is basically the same as using VBA to create PowerPoint slides, except with slightly different syntax. The function and variable names are all the same.
Anyway....I can add a picture to a slide. I can also add a specific layout, which creates some placeholders. But I can't figure out how to add a picture and link it to a specific placeholder. I want to import 4 pictures into PowerPoint and apply the "4 Object" layout. I could obviously manually place the pictures in the same locations that the layout would choose. But I would like to link them to the placeholders in case I ever need to change the layout.
Does anyone know how to add a picture and link it to a placeholder?
Thanks,
Andrew
There are a few MATLAB code submissions on the MathWorks File Exchange that may help you move figures from MATLAB into PowerPoint with specific layouts:
saveppt2 by Jedediah Frey.
subplotPPT by Mark Hoyle.
saveppt by Mark Brown.
The last submission has inspired the first 2, along with a few others that may also be of help to you (links are provided in the Acknowledgements section of the last submission).
Hope this helps!