Re: logarithmic HScale widget



Stefan Doehla wrote:

> I'm stuck in a little problem with my sliders ...
> I'm writing a oscilloscope and need a slider with
> values on a log-scale (or something similar).


Hi Stefan,

I did a little slider class for my app. It's a slider with no label, 
with a text box (GtkEntry) next to it. I called it tslider (text slider):

http://cima.ng-london.org.uk/~john/tslider.h

http://cima.ng-london.org.uk/~john/tslider.c

(you'll need to chop the code about slightly if you use any of it)

Normally the text and slider position are linked, so you can change the 
value by editing the text and pressing return, or by moving the slider. 
If you call tslider_set_conversions(), you can set a pair of functions 
which convert text->slider and back.

There are a bunch of them visible in this shot:

http://www.vips.ecs.soton.ac.uk/vips-7.7/snap.jpg

John



========================================================== 
Renaissance Autumn at the National Gallery 
A season of exhibitions, displays and events with a Renaissance theme. 

Pisanello: Painter to the Renaissance Court (24 October - 13 January 2002) 

For information and tickets: 
http://www.nationalgallery.org.uk/what/news/ren_autumn.htm



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