Hello,
I create a custom widget which draws a rule whose size varied.
I need to place the widget in a scroll panel.
To improve the user experience I would like to enlarge the area allocated to a widget using the associated scrollbar. Much like Excel.
I create an animated gif in order to understand the operation.
I'm new in the world of Gtk. I need your advice to guide me in achieving this widget.
In a first time, do you think this is possible?
Then, would you have an example, an application example which I can take?
If not, what step should I follow?
My first probleme is :
How to know when the scrollbar (slider) is pressed ?I have wrote :
Code:
g_signal_connect(G_OBJECT(m_hScrollbar), "button-press-event", G_CALLBACK(scrollbar_clicked));
Unfortunately this signal is emitted to the entire surface of the widget(GtkHScrollbar)
In parallel, I tried to connect to the event "
move-slider" but without success. Too bad because it looks quite what I need.
PS: I use Gtk+-2.0, and I am running Ubuntu 12 (precise) Unity