matlab - Retrive data from gui object while executing a script file -
i have simple gui user enters data , executes script file afterwards. want extract data entered in text boxes , tables gui. how can perform ?
note: gui used enter data. user has call script file workspace after entering data in gui.
to extract data uicontrol
can use wwhat called "dot notation":
h=uicontrol('styile','edit'); text=h.string;
(more uicontrol parameters should defined)
as alternative, can use "old style" function get
h=uicontrol('styile','edit'); text=get(h,'string')
about user required manually run script, can "automate" assigning script callback
property of uicontrol (e. g. pushbutton)
h=uicontrol('style','pushbutton','callback','my_script')
the my_script
m-file execute when user presses pushbutton.
hope helps.
Comments
Post a Comment