Loop through parents name
1 view (last 30 days)
I'm trying to create a ui-generating function that is called several time instead of raw-coding every tab / button ... of every section of my interface.
To do it, I need to call this function for different tabs, ie different parents.
For example I have this kind of code :
obj.Display.Compare_Options = uicontrol(obj.Display.Panel_Perfo,'style','check','unit','normalized'); %shortened compared to real code
- obj.Display.PanelPerfo is a uitab
- obj.Display.Compare_Options is a struct
And I'd like to be able to refer to different ui tab, as if I had something like :
uitabname = Panel_Perfo
obj.Display.Compare_Options = uicontrol (obj.Display.uitabname,'style','check','unit','normalized')
But when I do this, I have the error "Reference to non-existent filed 'uitabname' because MATLAB is searching for
Where I want it to search for
In order to change tab name based on callback source.
How can I make this happen ? Thanks !