Re: gtk_table and undefined behaviour?
- From: Carlos Pereira <carlos pehoe civil ist utl pt>
- To: gtk-app-devel-list gnome org
- Subject: Re: gtk_table and undefined behaviour?
- Date: Mon, 15 Jul 2002 14:25:31 +0100
If I have a table = gtk_table_new(4, 2, TRUE)
I could attach a label in the first cell (from left upper to right lower) with
gtk_table_attach_defaults(GTK_TABLE(table), label,
0, 1, 0, 1);
And a second one in the second cell (same row) with
gtk_table_attach_defaults(GTK_TABLE(table), label_2,
1, 2, 0, 1);
Is that right?
The sheme would look like the following:
------------------------------------- >>0
| | | |
| | | |
------------------------------------->>1
| | | |
| | | |
------------------------------------->>2
^ ^ ^ ^
0 1 2 3
You should see the gtk examples, that come with gtk.
There is a table example in there. That is the best
place to start learning gtk.
I suspect you are changing row with columns, see this example:
Carlos
---------------------------------
table = gtk_table_new (1, 7, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
label = gtk_label_new ("Color");
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_SHRINK, GTK_FILL, 5, 0);
gtk_widget_show (label);
label = gtk_label_new ("r");
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_EXPAND, GTK_FILL, 5, 0);
gtk_widget_show (label);
label = gtk_label_new ("g");
gtk_table_attach (GTK_TABLE (table), label, 4, 5, 0, 1, GTK_EXPAND, GTK_FILL, 5, 0);
gtk_widget_show (label);
label = gtk_label_new ("b");
gtk_table_attach (GTK_TABLE (table), label, 6, 7, 0, 1, GTK_EXPAND, GTK_FILL, 5, 0);
gtk_widget_show (label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]