Hubbry Logo
search
logo

Layout manager

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
Layout manager

Layout managers are software components used in widget toolkits which have the ability to lay out graphical control elements by their relative positions without using distance units. It is often more natural to define component layouts in this manner than to define their position in pixels or common distance units, so a number of popular widget toolkits include this ability by default. Widget toolkits that provide this function can generally be classified into two groups:

Android have the ConstraintLayout.

GTK have the Box and Grid classes.

In XUL, like the vbox Archived 2012-02-24 at the Wayback Machine container to stack components on top of each other.

This piece of code shows 3 buttons stacked on top of each other in a vertical box.

The DockPanel container lays out children components according to their Dock properties.

This code shows 4 text blocks on top of each other.

The FlowLayout layout manager arranges components in a directional flow, much like lines of text in a paragraph. It arranges components horizontally until no more components fit on the same line, then it places them on another line. Other layout managers are GridLayout managers which arrange the components in grid form and BorderLayout managers which also arranges the component in five parts of the frame, thus: south, north, west, east and center.

See all
User Avatar
No comments yet.