Re: help on array of widgets
- From: Yann LEYDIER <yann leydier info>
- To: gtkmm-list gnome org
- Subject: Re: help on array of widgets
- Date: Thu, 28 Jul 2011 08:59:03 +0200
In this case, you might need a TreeView associated with ListStore.
The model could contain a pointer (or an id) to an object of you own (an
object that would store some data and perform some processing, not a
widget) and some data to display (a name, an icon…). This is up to you.
Beware, I think that the reordering in TreeViews is implemented in terms
of delete+add. In some cases this might be an issue.
I advice you to read the tutorial on TreeViews on developper.gnome.org,
it is very well written.
yann
On 28/07/11 04:37, Mj Mendoza IV wrote:
Probably the original poster needs to explain what purpose he is trying
to achieve in storing widgets in a vector. There is probably a
fundamental design error present.
Hi Chris,
What I had in mind is like GIMP's Layer Dock where, a layer can be
added, removed and rearranged. To keep my learning simple, I
experimented with Buttons first. What I opted to do is a vector of
Buttons, which failed obviously. So with Yann's suggestion, I'm
currently using vector of Button pointers instead.
Do you have any better design in mind?
Regards.
Mj Mendoza IV,
Developer, KonsolScript
http://www.konsolscript.org
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]