[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Stop ProgressBar which is running SWT.INDETERMINATE
|
- From: "Simon Rutishauser" <simon.rutishauser@xxxxxx>
- Date: Sun, 27 Jul 2003 09:13:41 +0200
- Newsgroups: eclipse.platform.swt
- Organization: EclipseCorner
- User-agent: Pan/0.13.4 (She had eyes like strange sins. (Debian GNU/Linux))
Hi,
>> does anyone know how I can stop a progressbar created like this:
>>
>> ProgressBar p = new ProgressBar(parent, SWT.INDETERMINATE);
>>
>> now I'd like to stop it at some time. Just like setting
>> p.setRedraw(false), but actually this also prevents the bar from being
>> redrawn when it should (another window temporarily before progressbar)
>
> setRedraw() is definitely not what you want.
of course not. Just to illustrate what I really want as it (before the
window needs any redrawing) looks like what I want ;)
> It sounds like what you want is p.setEnabled(false), but that doesn't seem
> to work (at least on linux/gtk2, the progressbar continues to update after
> setEnabled(false) is called). Perhaps this is a bug, or maybe my
> understanding of what setEnabled() does for a ProgressBar is off.
setEnabled() isn't exactly described in the APIDoc. There's just written
that you can't click on a Button which is setEnabled(false)
I don't think this is a bug. It would rather be a feature request as
setEnabled(false) does not yet do anything with a progressbar. But I think
this wouldn't be a really clever function to place there because it
_only_ is for ProgressBar with SWT.INDETERMINATE and not for the rest
> Could you live with p.setVisible(false), and just have the progressbar
> disappear?
no, definitely not.
It looks like the easiest way is for me to use the Bar _without_
SWT.INDETERMINATE and to make it move with an own thread which is easily
stoppable
Peschmä