[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: change widget slider maximum dynamically?
- Subject: Re: change widget slider maximum dynamically?
- From: davidf(at)dfanning.com (David Fanning)
- Date: Tue, 2 Nov 1999 07:08:12 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <381EE686.2BCCE8B9@nist.gov>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:17043
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