Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!f13g2000yqj.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Putting a progress bar on a GUI - sorry, you're out of luck
Date: Thu, 11 Dec 2008 08:25:49 -0800 (PST)
Organization: http://groups.google.com
Lines: 71
Message-ID: <e4cad558-9b80-4b2a-9706-737d1ca6359c@f13g2000yqj.googlegroups.com>
References: <a6b98772-2bb0-4a16-932a-918c1d1cf1c8@k19g2000yqg.googlegroups.com> 
	<ghrdnu$jco$1@fred.mathworks.com>
NNTP-Posting-Host: 192.44.136.113
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1229012750 31475 127.0.0.1 (11 Dec 2008 16:25:50 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 11 Dec 2008 16:25:50 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: f13g2000yqj.googlegroups.com; posting-host=192.44.136.113; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
	CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 
	3.5.21022),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 bdci2px (NetCache NetApp/6.0.7)
Xref: news.mathworks.com comp.soft-sys.matlab:506369


On Dec 11, 11:05=A0am, "Gavrilo Bozovic" <gavrilo.bozo...@helbling.ch>
wrote:
> ImageAnalyst <imageanal...@mailinator.com> wrote in message <a6b98772-2bb=
0-4a16-932a-918c1d1cf...@k19g2000yqg.googlegroups.com>...
> > How can I put a progress bar onto my own custom =A0GUI?
>
> > I know Ash asked this on Sept. 30th, and Walter said to check out
> > waitbar(), but this solution doesn't really work. =A0For one thing,
> > waitbar brings up a completely separate window - it is not placed on
> > my main GUI.
> > Secondly, and most annoyingly, when my GUI is =A0busy crunching away in
> > it's loop and displaying stuff (like images) on the GUI, the GUI comes
> > to the top and completely obscures the waitbar (which is now
> > underneath). =A0I like to have my GUI's be full screen and a (bad)
> > workaround would be to make the GUI non-fullscreen, and try to arrange
> > the waitbar and GUI so that the waitbar does not get obscured, but
> > this is not really a nice solution.
>
> > Similarly there are several waitbar or progress bar functions uploaded
> > to the File Exchange but they're all separate windows and can't be
> > placed on your own custom GUI. =A0GET A CLUE MATHWORKS! =A0Look at the
> > most commonly searched terms on the FileExchange:
> > "abort ascii ascii progress bar bar class completion eta example
> > graphics gui gui tools interrupt merge meter ode process progress
> > progress bar progress text status terminate time left utilities wait
> > bar waitbar =A0"
> > 13 of the 25 terms of them are various names for showing progress or
> > completion. =A0Doesn't that tell you something?????!!!!!
>
> > You should be able to have a progress bar placed on the GUI. =A0MATLAB
> > only adds a built-in control every few years (most recently the table/
> > grid control). =A0Why can't they add something as basic, simple, and
> > useful as a progress bar. =A0I know I can add third party ActiveX
> > controls but for crying out loud, MATLAB should add this fundamental
> > essential control that will most likely get heavily user by their
> > customer. =A0Like I said, over half the file exchange searches are for
> > such a capability!!!
>
> > So I guess the answer to my question is "You can't - unless you use
> > third party AcrtiveX controls" so my question will probably turn into
> > a request for enhancement for a future version.
>
> > Regards,
> > ImageAnalyst
>
> A quick and dirty solution:
>
> h=3Dwaitbar(x);
> set(h,'windowstyle','modal');
>
> this way, the waitbar should always remain on top of the GUI. It's better=
 than making the GUI smaller than fullsize, but still not very elegant...- =
Hide quoted text -
>
> - Show quoted text -

---------------------------------------------------------------
Gavrilo:
Thanks for the tip.  I just tried it and it doesn't exactly work.  It
does stay on top but there are tons of "bonks."  It's weird, every
time I put a breakpoint in the code, I can continue and there are no
beeps/bonks but if I take the breakpoint out, there are tons of them.
I tried to track it down a bit and it seems like it has something to
do with calling the axes() command to set focus to different axes on
my GUI.  Whenever I want to display an image or plot something I need
to call the axes() function to make sure it happens in the desired
axes.  I even tried calling figure(handles.figMainWindow) to set focus
to my main GUI (instead of the waitbar) before I called the axes
command but that didn't work.  I still get lots of annoying bonk
sounds.
- ImageAnalyst