Re: Placing grid
- From: "Dr. Roland Bock" <box2OO6 eudoxos de>
- To: gtkdatabox-list gnome org
- Subject: Re: Placing grid
- Date: Fri, 22 Jan 2010 11:17:48 +0100
Abdoulaye Walsimou Gaye wrote:
Hello list,
I want to place a grid line on every number in rulers created by
gtk_databox_create_box_with_scrollbars_and_rulers().
I know that I get those rulers by using gtk_databox_get_ruler_{x,y}()
and then get lower, upper, position propeties by using
gtk_databox_ruler_get_range(). But I think I don't have enough data to
place my grid lines!
How to know the space between each number in a ruler?
In the current gtk-tutorial about rulers, they talk about 100 pixels
between numbers (?), does this
applies in case of GtkDataboxRuler? And if so, how to convert those
value in pixels to a real double number in order
to use gtk_databox_grid_array_new() to place my grid lines?
This 100 pixels between numbers rule given in the gtk-tutorial is not
valid for GtkDataboxRuler (and I doubt that it is more than a rule of
thumb for the gtk ruler).
I am afraid that basically you have to copy the algorithm of
GtkDataboxRuler to your application in order to figure out how to place
your grid lines.
An alternative might be to create your own ruler class: It inherits from
GtkDataboxRuler but exports the positions/values of the ticks with numbers.
Hope that helps.
Regards,
Roland
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]