Re: How to implement this custom widget?



Luca Cappa wrote:

Hello,
i would like to implement a widget like this:

+---------+
|Up Button|
+---------+
| Label1  |
+---------+
| Label2  |
+---------+
| Label3  |
+---------+
|         |
+---------+
|         |
+---------+
|         |
+---------+
|         |
+---------+
|         |
+---------+
| LabelM-1|
+---------+
| LabelM  |
+---------+
|Down-Button
+---------+


Where "Up" and "Down" are two buttons the scroll up and down the list composed of N labels, which visible at the same time are few than N, say for example M < N.

Which widgets should i use to implement that widget?

Thanks in advance,
Luca
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

I would not construct a custom widget to accomplish this. Instead I'd derive a class from one of the Gtk::containers and I'd add a pair of Gtk::Button widgets with a slot do the scrolling connected to their respective "signal_clicked" signals to issue commands to a Gtk::ListStore (for display of the labels) displayed in a Gtk::TreeView to accomplish the scrolling effect. Naturally, it'd all be contained in the appropriate containers for spacing and position.

Bob

Bob



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