3saul wrote:
Create code:
GtkWidget **b_buttons;
b_buttons = g_new(GtkWidget*, x);
for (i = 0; i x i != x; i++)
{
b_buttons[i] = gtk_button_new();
gtk_widget_show( b_buttons[i] );
gtk_table_attach (GTK_TABLE (table6), b_buttons[i], 0,
);
gtk_contaner_add( GTK_CONTAINER( parent ), buttons[i] );
gtk_widget_show( buttons[i] );
}
return( buttons );
}
How can I delete this buttons once they're created?
--
View this message in context:
http://www.nabble.com/Deleting-random-number-of-buttons...-t1745565.html#a4744787
Sent from
3saul wrote:
I'm creating some buttons like this
GtkWidget **
add_buttons( GtkWidget *parent, int n )
{
GtkWidget **buttons = g_new( GtkWidget *, n );
for( i = 0; i n ; i++ ) {
char label[256];
snprintf( label, 256, button %d, i );
buttons[i] = gtk_button_new_with_label( label
3saul wrote:
Sorry I made a mistake...I'm actually attaching them to a table, no
containers involved.
I've tried destroying and recreating the table they're attached too but it
doesn't seem to destroy the buttons!
Well they should be destroyed (a table is a container by the way)...
how are
: http://scentric.net/tutorial/treeview-tutorial.html
Here is a link to an complete example using the full GtkTreeView:
http://scentric.net/tutorial/sec-treeview-col-pixbufs.html
James,
--
View this message in context:
http://www.nabble.com/Random-Number-of-Buttons-t1480088.html#a4019004
Am Donnerstag, den 20.04.2006, 05:02 -0700 schrieb 3saul:
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.
How do you want to arrange them, and what should they contain?
--
Christian
On 4/20/06, 3saul [EMAIL PROTECTED] 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.
Just use an array of GtkWidget pointers. For example (untested):
GtkWidget **
add_buttons
You've solved my problem once more...and with much laughter! I told you last
time I'm a beginner *lol*
--
View this message in context:
http://www.nabble.com/Random-Number-of-Buttons-t1480088.html#a4006487
Sent from the Gtk+ - Apps Dev forum at Nabble.com
on a label
I've seen GTKIconView but that seems complicated to me (I'm a beginner)
--
View this message in context:
http://www.nabble.com/Random-Number-of-Buttons-t1480088.html#a4019004
Sent from the Gtk+ - Apps Dev forum at Nabble.com.
___
gtk-app-devel-list