Open text dialog with checkbox
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello Guys,
I am building a GUI with different functions in which I have an "Info" checkbox. When this box is checked, I programmed a uicontrol with some text in it which deems as information or help to the gui. When the checkbox is unchecked, the dialog box with the text is closed.
My question: How can I make this dialog box with the text to appear right next to the opened GUI, irrespective of where it is placed on the screen. It should always appear at the top right corner of the GUI (I have my checkbox also in this region). I tried to access the position of the GUI but the scaling seems to be different with different figures. Could someone please help me!!
Thanks, Advait
0 comentarios
Respuestas (2)
Robert Cumming
el 30 de Jul. de 2014
Editada: Robert Cumming
el 30 de Jul. de 2014
position and units are the 2 properties you want to look at.
Specific help wont be possible unless you give specific problem (i.e. code and example of when your dialog box position is not in the correct position.
Edit: based on your example code your problem is not the position but the fact the new dialog doesn't close when you uncheck the checkbox.
In the else section you need to delete (or set to invisible) the dialog you created. You need access to the figure handle to do that. Some ideas to get you going:
store the fig handle in handles data
store as a persistent variable in your callback.
store the handle in your user data of the checkbox
alternate your checkbox callback depending on the value
0 comentarios
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!