Re: [gtk-list] probably a silly question



Preben Randhol wrote:
> 
> I'm trying to make a small program in C with gtk. I want to have a
> toolbar with different buttons on it, load, save, print, etc. What I
> was wondering was, is it possible to fix the size of the buttons and
> the box so that the buttons don't get large/small and odd looking when
> I resize the window? I can't seem to find out how to do this.
OK you would probably use a hbox, so create it with
  myhbox = gtk_hbox_net(FALSE, 0);
The FALSE here says that the buttons can be different sizes.

Then create the button or whatever, you can adjust the size of it with
 gtk_widget_set_usize(widget, xsize, ysize);

When you put it in the hbox, set the expand value to FALSE, ie
gtkbox_pack_start(GTK_BOX(myhbox), mybutton, FALSE, FALSE, 0);

The first FALSE says adjust the hbox to fit the buttons, not the buttons to
fit the hbox. This will mean you will have a space on the right hand side of 
the hbox.

  - Craig



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