GEM/AES/VDI 'C' Sample Code Needed!!
Mark O'Bryan
obryan at gumby.cc.wmich.edu
Fri Jun 16 02:19:48 AEST 1989
In article <43b0b64c.14a1f at gtephx.UUCP>, covertr at gtephx.UUCP (Richard E. Covert) writes:
>
> As an example of where I am stuck I want to display a bar that fills
> from left to right as I process data. The bar can be in a blank screen of its
> own, but it would be nice to have a text displayed with it.
>
> Now, would I use a RSC editor to create the dialog box with the bar and
> the text?? If so, how do I create it with the above RSC editors?? I see that
Doing "gauges" is pretty easy, once you know how. To start off, you make
your dialog box by dragging out a "box" type and setting it to a 2-pixel
border with the "outline" attribute turned on. Stretch it so it's big enuf
to hold all the stuff you want inside. For your labels, drag down a STRING
object (unless you want to get fancy with sizes or colors, then you need a
TEXT object), then click on it and edit it to say what you want.
For the gauge itself, you'll need two nested boxes. Drag out one "box"
object and make it the size and shape you want for the full gauge. Pick
the fill color/pattern to correspond to whatever you want for "empty".
Then grab another "box" and drop it inside of the first one. Slide it
up until it's flush with the upper left corner of the container, then
resize it until it's as tall as the container and maybe half as wide.
Set the fill color/pattern to contrast and indicate "full". Give this
box a name, like "bar" maybe. Then you can access the width field of
the bar object, initially making it 0, and increasing it (and doing a
ReDraw) as the bar widens.
You'll also want to access the width field of the containing "gauge"
object, to see what the maximum width should be, and so you can grow
your bar at the proper proportional rate.
--
Mark T. O'Bryan Internet: obryan at gumby.cc.wmich.edu
Western Michigan University
Kalamazoo, MI 49008
More information about the Comp.lang.c
mailing list