GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Apr 16, 2014 1:23 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: GtkFixed disables propertiy of GtkVBox
PostPosted: Thu Nov 15, 2007 8:02 am 
Offline
Familiar Face

Joined: Wed Sep 19, 2007 1:30 pm
Posts: 10
Location: Hyderabad, India
Hi
i am packing /putting notebook and one search box into fixed (GtkFixed). and this fixed is packed into vbox
with expand and fill parameter as TRUE . so that when i maximized window only notebook get expand but when i maximized window the notebook is not get expanded
i am not getting where i am wrong. and not getting how fixed working .
please can anybody help me . The code is as follows


vbox = gtk_vbox_new (FALSE, 0);

/*----- Notebook------*/
notebook = gtk_notebook_new ();
gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_TOP);

label = gtk_label_new ("tab1");
tab = gtk_frame_new("Frame1");
gtk_widget_set_size_request(tab,300,450);
gtk_notebook_append_page (GTK_NOTEBOOK(notebook ), tab, label);

label = gtk_label_new ("tab2");
tab = gtk_frame_new("Frame2");
gtk_notebook_append_page (GTK_NOTEBOOK(notebook ), tab, label);

/*----search box -----*/
label = gtk_label_new ("Search");
tab = gtk_entry_new_with_max_length (20);

hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), tab, FALSE, FALSE, 0);

fixed= gtk_fixed_new();
gtk_fixed_put (GTK_FIXED(fixed),notebook,3,3);
gtk_fixed_put (GTK_FIXED(fixed),hbox,100,3);

gtk_box_pack_start (GTK_BOX (vbox), fixed, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (window),vbox);
gtk_widget_show_all(window);


Thank you
sphurti


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 17, 2007 5:40 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
I can't say I have an answer for you, however, if you can get comfortable with staying away from fixed layout and instead utilize packing, you'll more likely be able to get the application to size the way you want. Moreover, it will size the way an end user expects.

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group