Re: vslider min at bottom



> From: Jan-Marek Glogowski <glogow stud fbi fh-darmstadt de>
>
> Hi Jim
>
> > How do you specify that the minimum value of a vslider should be at the
> > bottom rather than the top?   On a similar topic , can i make a slider
> > work on a logarithmic scale?
>
> As Havoc wrote it's not possible directly. But you can "map" the values of
> the slider, when you connect a signal to GtkAdjustment "value-changed" event.
>
> So my solution would be
>
> - define th adjustment from 0 .. 100.
> - on the event make 100 - value and store it somwhere, where other
> funtions, which need the value of the slider can get it. Now you have
> slider with the min value at the bottom.
>
> Something similar applies to your logar logarithmic scale.

And if you want to be exceptionally clever, you can make a new object
derived from GtkAdjustment which implments this as a new signal.

Ron Steinke




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