hbox widgets with different heights
- From: Ignacio Nodal <inodal teleline es>
- To: GTK-List <gtk-list gnome org>
- Subject: hbox widgets with different heights
- Date: Sat, 09 Jun 2001 13:31:21 +0200
Hi again,
I'm packing a label, a scale and a button in a hbox. If I resize the
widget the label and the button should remain of the same size and the
scale should be expanded. So I used:
[...]
_box = gtk_hbox_new(FALSE, 0);
_label = gtk_label_new("Integer:");
gtk_box_pack_start(GTK_BOX(_box), _label, FALSE, FALSE, 5);
_adj = gtk_adjustment_new(val_default,val_min,val_max,0.1,1.0,1.0);
_scale = gtk_hscale_new(GTK_ADJUSTMENT(_adj));
gtk_range_set_update_policy
(GTK_RANGE(_scale),GTK_UPDATE_CONTINUOUS);
gtk_scale_set_digits (GTK_SCALE(_scale),0);
gtk_scale_set_value_pos (GTK_SCALE(_scale), GTK_POS_TOP);
gtk_scale_set_draw_value (GTK_SCALE(_scale), TRUE);
gtk_box_pack_start(GTK_BOX(_box),_scale, TRUE, TRUE, 0);
_button = gtk_button_new_with_label("[-]");
gtk_box_pack_start(GTK_BOX(_box),_button, FALSE, FALSE, 5);
[...]
That works fine.. the problem is I don't like the height of the button,
I would like it a little smaller, so I tried :
gtk_widget_set_usize(GTK_WIDGET(_button),20,5);
..but the button widget didn't care at all..
Is there any way to make a widget in a hbox smaller in height than the
other widgets??
Thanks in advance,
Ignacio Nodal
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]