Re: [gtk-list] gtk break the code into files programming question



Return a GtkWidget, and add it as a GtkWidget to the box. It is the
GtkWidget that has the packing attributes, not the menubar, take a look at
the structs at the top of the widget C files.

On Tue, 2 Jun 1998, Travis Loyd wrote:

> In attempting to break up my code I ran into a problem I don't know how to
> solve. In a separate file I create a menu bar and then I want to return
> it. Where the menu bar is created the return value is GtkWidget* but this
> attempt in the parent file fails.
> 
>         menu_bar = GTK_MENU_BAR( make_menu() );
>         gtk_container_add(GTK_CONTAINER(window), menu_bar);
>         gtk_widget_show(window);
> 
> If I declare menu_bar in the parent file as GtkMenuBar the assignment
> works but then the gtk_container_add fails.
> 
> How can I do this?
> 
> Travis Loyd
> [email: lelandg@usa.net							]
> [  pgp: send email with subject: sendmepgp				]
> 
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 

--
S.
GM/CS/MU -d+ H+>++ s+: !g p2 au0 !a w+++ v-(---) C++++$ UL++++$ UB+
US++ UI+++$ P+>++++ L++++$ 3+ E--- N+ K !W(-----) M+(-) !V -po+ Y+ t+
5++ !j !R G' !tv b+++ D++ B--- e+ u+* h++ f? r-- n---- y?




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