Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: automatically update editbox of one GUI with contents entered in 2nd GUI
Replies: 3   Last Post: Apr 11, 2012 11:04 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Matthew

Posts: 63
Registered: 6/7/10
Re: automatically update editbox of one GUI with contents entered in 2nd GUI
Posted: Apr 11, 2012 9:53 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

you can use guidata:
http://www.mathworks.com/help/techdoc/creating_guis/f13-998449.html

However, the way I've approached this problem in the past is to write all of my processing code into a handle object. The GUI takes the handle to the object and registers listeners on any properties and events that it cares about with proper callbacks to deal with the change in data. So instead of having to write one GUI to talk to the other, you just write each GUI to update the base object and update itself when something it cares about in the base object changes.

"Alex " <blue.harvest.83@gmail.com> wrote in message <jm5bbf$82n$1@newscl01ah.mathworks.com>...
> I have a GUI that runs a pretty intense data analysis on videos. For a new type of data I need to run, I have modified my original GUI to launch a 2nd GUI that lets me preview a portion of the data. After previewing the the data, I can also input initial conditions into the 2nd GUI, and import them into my main GUI with a push button (via setappdata and getappdata).
>
> Part of the preview (2nd GUI) is to help me select a single, specific frame of the video to analyze, and cut out parts of the video's frames that do not contain useful data, and would only take up cpu/ram for no real need. When I identify the frame I would like to use, I enter it in an editbox, which is (successfully) passed/imported to the code of the main GUI.
>
> There is another editbox in the main GUI that serves the same function that is being kept for the sake of the old data analysis method (as I will be needing it also).
>
> My question is how do I get the frame number I entered in the 2nd GUI to appear in the corresponding editbox of the main GUI when I import the variables?
>
> Short version:
> I want to update the contents of an editbox of one GUI with the contents entered into the editbox of a 2nd GUI.
>
> something like:
> gaussianFrame = str2num(get(handles.GUI_2_editbox,'string')); %get frame number entered in 2nd gui
>
> set(handles.GUI_1_editbox, 'string', gaussianFrame); %set string in 1st gui editbox to gaussianFrame




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.