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

Home » Public Forums » archive » cw_dual_slider: a slider with two slides
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: cw_dual_slider: a slider with two slides [message #51128 is a reply to message #50944] Fri, 27 October 2006 16:41 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Hi Mike

You write:

> I have the same problem if I run it on windows
>
> If I toss a device, retain=2, decomposed=0 into my startup file (it was
> already there on my linux systems) then it works, although the colors
> are not quite right. So I'll add "use widget_info(/system_colors)" to
> the list of things to do.

Humm. OK, looks promising. Here are a couple of ideas.

First, since you are saving and restoring the color
table, you assume we have 24-bit graphics cards. Why
then do you want us to cripple them to run this program
by setting DEVICE, DECOMPOSED=0? If you *must* use indexed
color, don't bother us with it. Let us use all the colors
we want. Get the current decomposed state (GET_DECOMPOSED)
when you get the colors, and restore it when you restore
the colors. :-)

Second, the numbers on top of the bar disappear when I
move the sliders towards the ends. You could either
put the numbers at either end of the bar (with the
appropriate ALIGN keyword) or, if you liked the numbers
moving, you could calculate how wide the number is
(use a negative value to the WIDTH keyword on XYOUTS)
so you could always keep it in view. You might need a
pixmap to do this properly, but see 3, below.

Third, the slider "flashes" as I move it. You could get
rid of most of the flashing if you "buffered" the output
in a pixmap, and then moved it over to the window with
the DEVICE, COPY technique.

I like the way it works, though. Good job! -)

Cheers,

David

P.S. I've done a similar window/level colorbar widget.
(Seen in Catalyst.) But I like the natural look of this
one better.
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Running GDL under windows with colinux
Next Topic: please help

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

Current Time: Thu Oct 09 23:04:10 PDT 2025

Total time taken to generate the page: 0.96231 seconds