comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Some more tricky questions........
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Some more tricky questions........ [message #14122] Wed, 20 January 1999 00:00
J.D. Smith is currently offline  J.D. Smith
Messages: 214
Registered: August 1996
Senior Member
David Fanning wrote:
>
> Phil Aldis (jmkimber@dera.gov.uk) writes:
>
>> Everything always goes wrong at once doesn't it. Here are some more
>> things which I suspect can't be done.....
>>
>> 1. I'm trying to create a properties box and I thought it would be
>> quite nice to have tabs, like windows properties boxes.
>
> The RSI Professional Services Group guys once wrote an IDL
> program with tabs. I can't quite remember how they did it, but
> lots of draw widget images, I think.
>
> In any case, I agree with JD. Ten minutes hard thinking about
> alternative presentations that stay within the normal bounds
> of IDL widget capabilities is usually the preferred solution.
> If you really want to do the fancy things, think about becoming
> a Windows or Motif programmer. :-)
>

But I suppose I should add that not *all* attempts at widget trickery
fail. One of the trickiest widget manipulations I've come up with is
the hotkey widget, which allows textual events to be processed on draw
(or other) widgets, by hiding a text widget behind it (see posts from
last year). I use this technique in almost all of my widget
applications. So, by all means, keep pushing the limits.

Just don't be surprised if the limits snap.

JD
--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
Re: Some more tricky questions........ [message #14123 is a reply to message #14122] Wed, 20 January 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Phil Aldis (jmkimber@dera.gov.uk) writes:

> Everything always goes wrong at once doesn't it. Here are some more
> things which I suspect can't be done.....
>
> 1. I'm trying to create a properties box and I thought it would be
> quite nice to have tabs, like windows properties boxes.

The RSI Professional Services Group guys once wrote an IDL
program with tabs. I can't quite remember how they did it, but
lots of draw widget images, I think.

In any case, I agree with JD. Ten minutes hard thinking about
alternative presentations that stay within the normal bounds
of IDL widget capabilities is usually the preferred solution.
If you really want to do the fancy things, think about becoming
a Windows or Motif programmer. :-)

> 2. Is there any way within the direct graphics system to have total
> control over text and be able to specify height as well as width?

"Total control"!? In IDL? No, I don't thing so. You can change the
default character size with the SET_CHARACTER_SIZE keyword to the
DEVICE command. In this way you could control both the height and
width of vector characters, sorta.

> 3. When you specify the position of a surface plot by
> POSITION=[0.2,0.2,0.8,0.8,0.3,0.9], what do those numbers translate
> into on the actual window. If you draw lines at those points, then
> there seems to be little correspondence between the position of the
> surface and the lines.

Ooh, here is a good question!

The default coordinate system in IDL has (0,0) in the lower-
left corner of the window and the Z axis coming out of the
window at you. I think these POSITION values pertain to the
location of the plot in *that* coordinate system.

But if you have tried to make a surface plot in object graphics
you know that you have to rotate, scale, and translate that
drawing coordinate system into the coordinate system of the
view. IDL does the same thing. The surface plot is scaled and
translated into the center of the display window. You have no
control over how that is done in direct graphics and the result,
of course, is that those POSITION coordinates don't appear to
do too much. :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Some more tricky questions........ [message #14124 is a reply to message #14122] Wed, 20 January 1999 00:00 Go to previous message
J.D. Smith is currently offline  J.D. Smith
Messages: 214
Registered: August 1996
Senior Member
Phil Aldis wrote:
>
> Hi,
>
> Everything always goes wrong at once doesn't it. Here are some more
> things which I suspect can't be done.....
>
> 1. I'm trying to create a properties box and I thought it would be
> quite nice to have tabs, like windows properties boxes. If you look
> at the Windows display properties box, while I attempt to describe
> what I was thinking of doing then it might possibly make some sense.
> The best way I could think of doing this was to have a group of
> buttons which were by default all pressed but one was always up. Below
> the buttons I would map the relevant bases associated with each button
> or tab and with some careful placing it would look as if the buttons
> were tabs. I would then put tab looking bitmaps on the buttons.
> However I can't see any way of creating the opposite of an exclusive
> base, i.e. all of them are pressed except for one. Is there any way of
> making an exclusive button change its state from within a program.
>

You could easily just use a non-exclusive base populated with buttons
with code in the event handler to create this functionality. That is,
whenever a button is *un-selected*, set all others to selected via
widget_control,button,/set_button. If the current (and only) unselected
button is selected, simply disregard this event. This creates the
negative of an exclusive base.

I think this won't do what you wan't though, since you will get radio
buttons or checkboxes, *not* the normal "text-within-the-button" button,
which look more like the tabs of a pane.

You could also of course use 2 bitmaps for each button... a selected and
an un-selected bitmap, toggling as necessary. I've always just used a
normal exclusive base for this purpose. Usually attempts to expand
IDL's widget toolkit by trickery will yield disappointing results.

Good Luck,

JD
--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Assoc question
Next Topic: Some more tricky questions........

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 10:35:54 PDT 2025

Total time taken to generate the page: 1.44051 seconds