GUIDE Tabs Support in R2014b
Mostra commenti meno recenti
Will GUIDE support tab panels in the release version of R2014b?
Risposta accettata
Più risposte (3)
Robert Cumming
il 2 Ott 2014
0 voti
I guess the answer to this will become known once R2014b is released - in the meantime you could look at this gui framework gui framework development which has its own version of guide which supports tabs (it should work for all versions of Matlab from R2008a onwards).
Sean de Wolski
il 3 Ott 2014
0 voti
No, GUIDE does not support uitabs or uitabgroups in R2014b.
8 Commenti
Will Reeves
il 15 Ott 2014
Modificato: Will Reeves
il 15 Ott 2014
why not? :-)
Or more specifically, is it possible to programmatically create a gui with a tab group and panels, convert it to a figure file and then edit the remaining control layout in guide?
Sean de Wolski
il 15 Ott 2014
It might be possible, but it's going to be ugly and require a whole lot more kludge than just writing the whole thing programmatically (either with nested functions or classes).
Robert Cumming
il 16 Ott 2014
Nested functions are okay, but as your GUI gets larger it gets more difficult to manage.
You can build a GUI using normal functions, you just need to manage how the functions talk to each other. For example store all the uicontrols in the parent figure appdata and manage using setappdata and getappdata.
Then any callback needs access to the figure handle to get access to all the uicontrols.
Sean de Wolski
il 16 Ott 2014
Ugghh, I disagree. Nested functions are much cleaner than appdata.
Classes are the best of all but require the obvious OOP learning curve.
Robert Cumming
il 16 Ott 2014
Modificato: Robert Cumming
il 16 Ott 2014
I agree classes are best.
Each to their own regarding nested functions, but as the GUI gets bigger, in my experience and opinion, they become harder to manage (and debug due to static variable). Its much easier in the long term to split it out into small functions.
For example I've been involved in a function based GUI which was around 100,000 lines of code. Impractical to do with nested functions.
Don't get me wrong, for small compact GUIs nested is often a good solution and I have used it as well. Its important to think about the future development of the GUI when you start.
Sean de Wolski
il 16 Ott 2014
For 100k lines of code, in my opinion, there should be multiple classes doing this. Debugging either nested functions or appdata on this scale is impractical. Also note, I'm all for having multiple small functions. Some of those can have their own nesting as necessary.
Robert Cumming
il 16 Ott 2014
I couldn't agree more, but that code i was quoting started life in r2006b if I recall. So classes weren't a viable option.
Sean de Wolski
il 17 Ott 2014
Modificato: Sean de Wolski
il 17 Ott 2014
@Will, Give this a try, and extrapolate:
Charles
il 29 Mag 2015
0 voti
See if that works for you.
Categorie
Scopri di più su App Building in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!