Re: How to create scales for range widgets?



On Tue, 22 Aug 2000, David J. Topper wrote:

> Vlad Harchev wrote:
> 
> >  Could you post your stripped-down source (probably with main function) to
> > help us helping you?
> 
> A bit hard to strip down but I'll try.
>  
> >  I addressed this about half a year ago without any problems.
> 
> A key issue for me is to be able to do non standard mappings.  Regardless, it
> should be the same.  It's kind of like a clock, where I need values to go
> from 1:00 up to 12:59, then right to 1:00.  I have a "conversion" function
> that will change values coming in from the adjustment.
> 
> Here's a sample function.  Bascially just call it with a ptr to an
> adjustment.  It takes in the adj values and creates a slider range widget and
> a scale next to it, with some frames to make it look nice.  It also adds a
> text box at the bottom which will display the adjustment's "value."  The
> problem is that with different "steps" the scale listing gets skewed.  I find
> no easy way to correlate a scale to a range widgets value / range.  It always
> seems to be ok in one case, but then off in another:

  I tried the code you posted with second mail from you (i.e. the one with
main() function).
  Changing the flags of 2nd scale from OPC to NORMAL it was made a usual scale
that worked without any glitches/flaws. I don't get - what is your problem?
Could you demonstrate it using only scales with flag NORMAL? (Give exact
values for step sizes and range)? If you can't - then there is a flaw in math
in pchoct() and other conversion functions.

 Best regards,
  -Vlad






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]