widget blues [message #1673] |
Tue, 15 February 1994 03:26 |
hschult
Messages: 5 Registered: February 1994
|
Junior Member |
|
|
Hello,
we recently purchased IDL, and I am very enthusiastic about it. However, I
am having some problems programming complex widgets -- maybe someone out there
can help me:
I want to make a widget which will adjust the value of an integer, either up
or down depending on whether I click on an up-arrow or down-arrow next to the
value. Call this widget "ticker" for want of a name.
1) I want to make 2 arrowheads close to one another to increment or decrement
the value. I tried to use buttons with bitmap images, but motif -- or
rather the way IDL uses motif -- always puts a frame around the buttons,
so I cannot fit the 2 buttons at all into the height of a text line.
This makes ticker cumbersome, graphically speaking.
2) I replaced the buttons with a widget_draw object 16 x 16 pixels and put a
picture of 2 arrowheads in it. This works fine: if I get a mouse click on
the upper half of the image, I increment the value, on the lower half, I
decrement it. However, I can't put the picture into the draw widget until
the widget is realized. This makes it unweildy to use ticker as a canned
routine -- when the user calls ticker to create the widget, he has to
return control to ticker sometime after he has realized the window with
a ticker in it.
3) I want a ticker widget to look like this -- label: value A
where A is my arrowhead picture. I can't get IDL to put these sub-widgets
where I want, except by using xsize, xoffset as one isn't supposed to
do. And that is cumbersome, because you have to figure out how big the
label and value are by how many characters they contain and the font used.
Am I missing something simple here?
Thanks for any help
..Howard Schultens hschult@gwdgv1.gwdg.de
|
|
|