Re: Create dynamic Widget Count
- From: Joaquim Duran <joaquimduran adtelecom es>
- To: Robert Eckardt <roberte88 web de>
- Cc: gtkmm-list gnome org
- Subject: Re: Create dynamic Widget Count
- Date: Thu, 12 Jun 2008 14:11:45 +0200
Hello,
In this page of the tutorial, is explained how to create widgets:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/chapter-memory.html
Joaquim Duran
En/na Robert Eckardt ha escrit:
Hello List,
I have a problem. I want too create in my program dynamic Widgets.
i have used pointer to create the widgets, my Code:
for(int i=0;i<*folderCount;i++) {
mainLabel_Folder[i] = new Gtk::Label("Label");
mainVBox_Folder.pack_start(*mainLabel_Folder[i],Gtk::PACK_EXPAND_WIDGET);
}
I can compile, if the code is in the right order, IF in false order i get compile errors.
if compiled:
i have sometimes "segemtation fault" if I clicked on an OTHER widget(not all, only one or two):
With this code, all thinks work: (but it is not dynamic, because i have to give a array length)
for(int i=0;i<*folderCount;i++) {
mainLabel2_Folder[i].set_label("LabelWork");
mainVBox_Folder.pack_start(mainLabel2_Folder[i],Gtk::PACK_EXPAND_WIDGET);
}
Can someone please help me, getting a dynamical count of Widgets in my Window Class?
thanks
Robert
_______________________________________________________________________
EINE FÜR ALLE: die kostenlose WEB.DE-Plattform für Freunde und Deine
Homepage mit eigenem Namen. Jetzt starten! http://unddu.de/?kid=kid mf2
_______________________________________________
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]