RE: Help with gtk table



You might want to change "++count" to "count + 1".  It looks like count = 0 and
++count = 1 during the first loop.  However, count = 2 and ++count = 3 during
the second loop.  But I believe a 2x2 table only has a range of 0 to 2.  Hope
this helps.



				-- Stupid Genius

> ----------
> From: 	Rasoul Hajikhani[SMTP:rhajikhani exchange office etoys com]
> Sent: 	Wednesday, November 08, 2000 6:14 PM
> To: 	gtk-list gnome org
> Subject: 	Help with gtk table
> 
> Hi there, 
> I am new to gtk. My dilema is that I want to populate the columns of a
> table in a loop. It is a 2x2 table and I only want to populate the upper
> cells. this is my command
> for (i = 0; i <= 1; i++)
>  {
>             count = i;
>       
>             lh = gtk_level_hold_new(300, 20,
>                                     GTK_LEVEL_HOLD_FADE,
>                                     8,
>                                     3,
>                                     5);
>       
>             gtk_table_attach_defaults( GTK_TABLE(table),
>                                        lh,
>                                        count,
>                                        ++count,
>                                        0,
>                                        1);
> /* rest of the code here */
> But I get an error:
> Gtk-CRITICAL **: file gtktable.c: line 510 (gtk_table_attach): assertion
> `left_attach < right_attach' failed.
> 
> Can any one help? What I am doing wrong?
> 
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]