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

Home » Public Forums » archive » Re: change widget slider maximum dynamically?
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: change widget slider maximum dynamically? [message #17589 is a reply to message #17588] Tue, 02 November 1999 00:00 Go to previous messageGo to previous message
Craig Hamilton is currently offline  Craig Hamilton
Messages: 28
Registered: December 1996
Junior Member
One way I have dealt with this problem is to just not display
the slider min and max values and use text widgets to display
the min/max values. I just set the slider to a min of 0 and max
of 100 and read off the percentage that I'm interested in.
That way, the slider widget doesn't need to
be changed. You just have to keep track of the data min/max
separately and calculate the percentage into the data based
on the slider setting.

Craig

--
-Craig A. Hamilton,PhD cah@medeng.wfubmc.edu
-Wake Forest Univ. School of Medicine
-Dept. of Med. Engr. / MRI Center
-Medical Center Blvd.
-Winston-Salem, NC 27157-1022
-(336)716-2819 [FAX: 2870] [Secr: 6890]


David Fanning wrote:
>
> Rob Dimeo (robert.dimeo@nist.gov) writes:
>
>> No doubt someone has probably figured this one out some time ago.
>> However can anyone help me with using the widget slider control? In
>> particular I would like to be able to set the maximum value of the
>> widget slider dynamically (i.e. after the slider has been realized). I
>> would like to set the maximum value of the slider at the conclusion of
>> reading in a data set. Since a new data set may contain a different
>> number of "groups" then the first one then it would be ideal to simply
>> update the maximum in the slider.
>
> I was just looking at a piece of code I have that does
> exactly this. I resorted to destroying the old slider
> and recreating a new one with a new maximum value.
> I'm not a big fan of destroying any widget except the
> top-level base (I guess because I got hurt so bad
> when widgets first came out years ago), but this
> worked wonderfully well in my Windows application
> and I think it is reasonably safe to do now on
> most platforms.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: point_lun question
Next Topic: high priority interupt event

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

Current Time: Wed Oct 08 18:44:31 PDT 2025

Total time taken to generate the page: 0.00421 seconds