[comp.windows.x.motif] Completion bar

anderson@watserv1.waterloo.edu (G.Anderson - Computing Services) (09/11/90)

I am looking for a way of displaying a bar, and filling it in as a  
task is completed to give a visual indication of completion of a
task, much like the MAC system does.

Motif as far as I can see does not suggest a way of doing this or
provides a widget for it.
 
Does anyone have suggestions? or code to do so.

I am just starting out with Motif, so forgive me if this has
already been talked about.

bobmcc@tiger.tcs.com (Bob McCormick) (09/12/90)

In article <1990Sep11.155203.18830@watserv1.waterloo.edu>,
anderson@watserv1.waterloo.edu (G.Anderson - Computing Services) writes:
|> I am looking for a way of displaying a bar, and filling it in as a  
|> task is completed to give a visual indication of completion of a
|> task, much like the MAC system does.
|> 
I would use the "scale" widget, with a minimum of 0 and a maximum
of 100 (i.e. percent).  Then I think you can just keep updating the
value of the widget, and the slider will move along the scale to
indicate the percentage of the job that is completed.

Bob

roger@zuken.co.jp (Roger Meunier) (09/12/90)

In article <1990Sep11.155203.18830@watserv1.waterloo.edu> anderson@watserv1.waterloo.edu (G.Anderson - Computing Services) writes:

 > I am looking for a way of displaying a bar, and filling it in as a  
 > task is completed to give a visual indication of completion of a
 > task, much like the MAC system does.

The Label widget accepts either a text string or a pixmap.  You can
create the label with a blank string/pixmap, and then use XtSetValues()
to change the string/pixmap as the task progresses.

Another possibility is the Scale widget.  You can set the initial scale
value to the minimum at creation, then update the scale value as the
task progresses.

Hope this helps...
--
Roger Meunier @ Zuken, Inc.  Yokohama, Japan	(roger@zuken.co.jp)