comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: Ada libs to X11
Date: 1998/12/07
Date: 1998-12-07T00:00:00+00:00	[thread overview]
Message-ID: <74gu1c$n5h$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 74f6g3$3nf$2@polaris.cc.upv.es

In article <74f6g3$3nf$2@polaris.cc.upv.es>,
  anvilhue@pleiades.upv.es (Antonio Villalon Huerta) wrote:
> Jerry van Dijk (jerry@jvdsys.stuyts.nl) wrote:
>
> > What is 'changing its level' mean for a rectangle ?
>
> Yes, I didn 't explain it very well. The main  goal is to draw a simple
> rectangle which will be the liquid of a tank . When a function is called
> to modify the liquid level, the rectangle obviously has to be higher or
> lower: its size (its height, the width will be always the same) will
> increase or decrease, depending on the modification of the liquid level.
> Many thanks,

You are correct that a button isn't very good for that purpose. You could try
to use an inactive vertical scale. But really most of the TK widgets (like
the Motif widgets) are meant for standard user interfaces. They are generally
*not* appropriate for representing real-world objects like engines or storage
tanks.

What you may want to do is use a Canvas. Canvases allow you to place and
manipulate things like rectangles, circles, oval, polygons, custom bitmaps,
etc. From those primitives you can make displays and controls look pretty
much any way you want. In your case, a rectangle with a filled rectangle
inside sounds like it would foot the bill. You can dynamicly change the
height of the inner rectangle when you need to.

If you need to do a lot of custom stuff like this, I'd highly suggest you get
one of the many TK GUI builders available. I'd also suggest you invest in a
good TK reference book.

I know this doesn't address the Ada side at all. But it sounds like TK is
going to be more than half of the battle for you.

--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  parent reply	other threads:[~1998-12-07  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-06  0:00 Ada libs to X11 Antonio Villalon
1998-12-06  0:00 ` Corey Ashford
1998-12-07  0:00   ` Antonio Villalon Huerta
1998-12-06  0:00 ` Jerry van Dijk
1998-12-07  0:00   ` Antonio Villalon Huerta
1998-12-07  0:00     ` Jerry van Dijk
1998-12-09  0:00       ` Antonio Villalon
1998-12-07  0:00     ` dennison [this message]
1998-12-09  0:00       ` Antonio Villalon
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox