Re: [gtk-list] gtk_bin and Frame problem



On Sun, 28 Jun 1998, Didimo E. Grimaldo T. wrote:

> Hi *,
>     I am having a bit (byte?) of a problem when using this convenience
>     function below. The function creates a Label + Entry pair on an
>     HBox. This is then 'appended' to the frame that was created within
>     a Notebook Tab:
> 
>      Notebook
>         \_______ Tab[1]
> 	          \___ Frame
> 		         \____ HBox { Label + Entry }[1]
> 		         
> 
>    It works fine with the first labelEntry addition to the tab's frame, I
>    also see it when I switch to that particular tab.
> 

>    When I try to add the 2nd and 3rd LblEntry to the same frame they don't
>    get mapped, in fact I get a run time error:
> 
>     ** WARNING **: file gtkbin.c: line 203 (gtk_bin_add): "bin->child == NULL"
> 
>     ** WARNING **: file gtkbin.c: line 203 (gtk_bin_add): "bin->child == NULL"
> 
>    so one for the 2nd and one for the 3rd. If I have one only it works fine.
>    Can anybody tell me what I am doing wrong? I added checking on 'NULL' for
>    the frame, hBox, Lbl and Entry and none of them are NULL. Hope to hear
>    some feedback.

a frame can hold one child at maximum.
you need to add a vbox to the frame, and then add your hboxes to
that vbox.

> 
>    		Cheers,
> 			Emilio
> 
>    

---
ciaoTJ



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