logarithmic HScale widget
- From: Stefan Doehla <stefan power ele utoronto ca>
- To: gtk-list gnome org
- Subject: logarithmic HScale widget
- Date: Tue, 11 Dec 2001 15:19:40 -0500
Hi all!
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).
The values are usually:
slider1:
0.00001, 0.00002, 0.00005, ... 50000, 100000
slider2:
1,2,5,10, ...,500
So I thought about 2 different solutions ...
Idea 1:
- use a normal slider with e.g. 36 integer values
-> lookup in a table the corresponding values
- problem: the value above my slider has the integer values
and it's not possible to set this value from outside ...
Idea 2:
- use the code of gtkhscale.h/c and modify it as my own widget
-> #include "gtkloghscale.h", ...
have a lookup table inside the widget ...
- problem here: compiles fine but I get the following error with
gtk_log_hscale_new():
==
Gtk-WARNING **: gtk_widget_new(): could not find argument "adjustment"
in the `GtkLogHScale' class ancestry
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkObject'
Gtk-CRITICAL **: file gtksignal.c: line 724 (gtk_signal_connect):
assertion `object != NULL' failed.
==
I replaced nearly every (but static) occurence of hscale with
log_hscale. I need no more the <gtkhscale.h> ...
What must I change to get rid of the nice message of gtk ...
Thanks for any help,
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]