gtk_table_attach()
Using gtk_table_atttach() I can attach widgets to a table. Suppose the table is in a dialog box. I hide the dialog but next time I display it, I want some other widget to occupy the same space. There doesn't seem to be a 'gtk_table_detach()' function - so:- 1) Is there some other way to remove a widget from the table? and / or 2) If I attach a new widget in the same place as the previous one, will this work (i.e. will it replace the previous widget) or is this just asking for trouble? John ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk_table_attach()
On Wed, 10 Aug 2011 15:41:35 +0100 John Emmas john...@tiscali.co.uk wrote: Using gtk_table_atttach() I can attach widgets to a table. Suppose the table is in a dialog box. I hide the dialog but next time I display it, I want some other widget to occupy the same space. There doesn't seem to be a 'gtk_table_detach()' function - so:- 1) Is there some other way to remove a widget from the table? GtkTable inherits from GtkContainer so you can just call gtk_container_remove(table, widget). Be sure to grab a reference on the widget if you don't want it to be destroyed after the removal from the table. 2) If I attach a new widget in the same place as the previous one, will this work (i.e. will it replace the previous widget) or is this just asking for trouble? Whether this makes sense or not depends on your application. Technically speaking it's no problem at all to replace widgets. - Jannis ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk_table_attach()
On 10 Aug 2011, at 15:49, Jannis Pohlmann wrote: GtkTable inherits from GtkContainer so you can just call gtk_container_remove(table, widget). Be sure to grab a reference on the widget if you don't want it to be destroyed after the removal from the table. [...] Whether this makes sense or not depends on your application. Technically speaking it's no problem at all to replace widgets. Thanks Jannis. I'll give those suggestions a try tomorrow. John ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Fwd: gtk_table_attach api, GtkAttachOptions usage
Hi Iam trying to use gtk_table_attach api. I have issues using xoptions(GtkAttachOptions) and yoptions in this api. Iam not able to understand how I can use EXPAND, SHRINK and FILL options. I tried to write a program that does the following: 1. create a table using gtk_table_new api 2. Attach a button to the table using gtk_table_attach api with this expand option 3. Then resized the table. Iam expecting the button be resized in the window since the table is re-sized. Can you please provide me a input on how the GtkAttachOptions be used from the application point of view. -- Thanks Sundeep. -- Thanks Sundeep. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk_table_attach api, GtkAttachOptions usage
Hello. First of all, cross-posting is bad and tends to annoy people. Stick to your original post. Iam trying to use gtk_table_attach api. I have issues using xoptions(GtkAttachOptions) and yoptions in this api. Iam not able to understand how I can use EXPAND, SHRINK and FILL options. I tried to write a program that does the following: 1. create a table using gtk_table_new api 2. Attach a button to the table using gtk_table_attach api with this expand option 3. Then resized the table. Iam expecting the button be resized in the window since the table is re-sized. Can you please provide me a input on how the GtkAttachOptions be used from the application point of view. GtkAttachOptions is enumeration of bitfield flags. These flags can be added together using bitwise or. And as David already said, you probably missed GTK_FILL flag in your gtk_table_attach() call. For example, this call: gtk_table_attach( table, child, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_EXPAND, 0, 0 ); will cause widget to expand horizontally when table is resized. Vertically, widget will stay of the same size, only distance to other widgets will increase. Tadej -- Tadej Borovšak tadeboro.blogspot.com tadeb...@gmail.com tadej.borov...@gmail.com ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
frame and a spinner with gtk_table_attach to cell - question
Wednesday, January 30 Hello, If I put a spinner in a frame in a table cell with gtk_table_attach it unfortunately overlaps and looks garbled :( How should I do this so that they don't overlap within the same cell ? Here's what I'm doing now. snippet ... /* the frame */ mvfr = gtk_frame_new(test radio); gtk_table_attach(GTK_TABLE(table), mvfr, 0, 1, 0, 1, GTK_SHRINK, GTK_EXPAND, 4, 4); /* the spinner */ fxadj = (GtkAdjustment *)gtk_adjustment_new(1.0, 1.0, 100.0, 1.0, 1.0, 0.0); fxspinner = gtk_spin_button_new(fxadj, 0, 0); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(fxspinner), TRUE); gtk_table_attach(GTK_TABLE(table), fxspinner, 0, 1, 0, 1, GTK_SHRINK, GTK_EXPAND, 4, 4); Thanks for any possible suggestions. K. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list