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: gui, playing with figures
Replies: 6   Last Post: Sep 9, 2009 4:52 PM

Advanced Search

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

Posts: 17
Registered: 7/8/07
Re: gui, playing with figures
Posted: Sep 8, 2009 8:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"us " <us@neurol.unizh.ch> wrote in message <h7qlbm$2mp$1@fred.mathworks.com>...
> "Tomas Schiler" <excal@atlas.cz> wrote in message <h7qjun$hfs$1@fred.mathworks.com>...
> > Hello,
> > I have small problem. I would like to make gui for displaying data. User should be able to create figure (or figures) and then add data. To make it look as I wish I need couple of things and i am not sure that it is possible to make in in matlab &#61514;&#8230;SO is possible to get pointers to all actual open figures? Is possible from gui to get information that user clicked on some figure with data? Is possible to get information about order of open figures?
> > Thanks for all suggestions

>
> yes, all you want is possible...
> to be more specific, you need to come up with an exemplary code snippet...
>
> also, look at matt fig's great FEX contribution, which might come with an example for you...
>
> http://www.mathworks.fr/matlabcentral/fileexchange/24861
>

Hello
I went through the FEX contribution and in helped me in some problems. However I still don&#8217;t know how to detect that some of my figures went in frond (become focused). I will try to describe what I would like to achieve on easy example. I have this easy gui. When user presses button it makes plot and set title to string value written in textbox.

S.fh = figure('units','pixels',...
'position',[500 500 350 50],...
'menubar','none',...
'numbertitle','off',...
'name','GUI_20',...
'resize','off');
S.ed = uicontrol('style','edit',...
'units','pixels',...
'position',[10 10 220 30],...
'fontsize',14,...
'string','Enter Title');
S.pb = uicontrol('style','push',...
'units','pixels',...
'position',[240 10 100 30],...
'fonts',14,...
'str','creat figure',...
'callback',{@pb_call,S});

function [] = pb_call(varargin)
% Callback for the button labeled PUSH_1.
S = varargin{3}; % Get the structure.
figure
plot(rand(10,1));
title(get(S.ed,'String'));


And I would like to find a way how to add ability that when you click on some created figure (it become focused) the string in text box will change to title of focused figure. I couldnt do it with WindowButtonDownFcn. Only options i can think of is to start new thread an let it check every 5s which figure is focused but i don't like this solution.
Thank you


> us



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.