Re: Random Number of Buttons
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: 3saul <saul_lethbridge hotmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Random Number of Buttons
- Date: Thu, 20 Apr 2006 14:35:38 +0200
On Thu, Apr 20, 2006 at 05:02:48AM -0700, 3saul wrote:
I'm wanting to know the best way to declare a random number of buttons for my
gtk app. The number will changed depending on the argument passed to my app.
GtkWidget **buttons;
buttons = g_new(GtkWidget*, n);
for (i = 0; i < n; i++) {
buttons[i] = gtk_button_new...
gtk_button_whatever(GTK_BUTTON(buttons[i])...
...
gtk_box_pack_start(GTK_BOX(some_box), buttons[i]...
}
Since this is a basic C skill, I suppose this is not the
problem -- so what is the problem?
Yeti
--
That's enough.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]