Re: [gtk-list] Question on using layout



On Thu, 29 Apr 1999 10:00:45 -0400, gtk-list@redhat.com (V G Prasad \[ext 294\]) wrote:
> I am trying to write a application which has all fixed sized widgets at known
> (x,y) coordinates. 
> I am planning to create the fixed size widgets with the use of hbox/vbox and
> alignment widget. Also to place the widgets at the right coordinates, I am
> thinking of using  GtkLayout   and place the  widgets on  the layout using
> gtk_layout_put(layout, x,y)
> Question : Is there a better way to implement this.?

You can use gtk_widget_set_usize() and friends to set the size of a
widget.

My question is: Are you _really_ sure you want fixed size widgets at all?
Fixed size widgets can look extremely ugly when their parent widget gets
resized. Fixing the size of a text widget is also a not a good idea: font
sizes can differ between X servers. You'd better use GTK's automatic
alignment to get a correct alignment for all window sizes. Maybe you
should use a GtkTable to do the aligntment.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/




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