[Tutor] laying out frames

Alan Gauld alan.gauld at freenet.co.uk
Tue May 16 09:49:26 CEST 2006


> I want to create a basic quadrant of frames but am not able to 
> follow the
> logic to do so, whats the right way or an easier way to control 
> layout of
> frames and wigets. A pixel approach would be nice (where by you can
> specify pixel locations for a frame or a widget to be located) 
> instead of
> specifying arbitary location positions like LEFT, RIGHT, etc and 
> things
> moving constantly when you add more widgets or resize windows.

You can use the placer widget manager instead of grid or pack to 
specify
pixel based locations. But grid or pack are preferred precisely 
because
they do automatically move things around when you resize screens - one
of the hardest things to do when using pixel arrangements! Also pixel
based layouts tend not to be very portable between systems - some
use square pixels, others rectangular etc So the GUI looks different 
on
different machines. Intelligent layout managers make life much easier
if you are running on anything other than a single defined computer 
spec.

For a quadrant layout the grid manager is probably the best option.
Simply define a 2x2 grid and put the frames/widgets in that.

However even using pack its easy enough, just define two frames,
top and bottom. insert two frames(left and right) into reach of those
two frames. This gives you 6 frames in total.


HTH,

Alan G. 




More information about the Tutor mailing list