From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,408b62d6800b8830 X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: Ada libs to X11 Date: 1998/12/07 Message-ID: <74gu1c$n5h$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 419643553 References: <74d2jm$2ss$1@polaris.cc.upv.es> <74f6g3$3nf$2@polaris.cc.upv.es> X-Http-Proxy: 1.0 x15.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Mon Dec 07 15:59:42 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1998-12-07T00:00:00+00:00 List-Id: 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