Table of Contents
Panel
Panel (TPanel) is a general-purpose panel used to hold multiple controls for organizing purposes. It is used to hold some group of your components. Generally they are used with Alligns. We highly recommend you to align Panels to Left, Right, Top, Bottom or Client. Thereby, your application with contents in different panels may resize itself by the change of resolution, by the change of windows size or by the change of device used. This will make your application more friendly with size proportions.
We recommend you to use aligns but in same cases you can change its size manually as below too;
1 2 3 4 |
Panel1->Position->X=100; Panel1->Position->Y=100; Panel1->Width=320; Panel1->Height=200; |
Layout
A Layout (TLayout) is a container for other graphical objects. It is same as Panels, while Panels has borders and background color, Layout has no depth, no color. It is good to align group of components. It can be also used on your custom graphics by using in the Images. Layouts are graphically lighter than Panels.
1 2 3 4 |
Layout1->Position->X=100; Layout1->Position->Y=100; Layout1->Width=320; Layout1->Height=200; |
ScaledLayout
ScaledLayout (TScaledLayout) is same as Layout except it is scaling everything inside when its size is changed.
We can let user to scale your layout by using Splitter or any other components. We can also change its original and current Width and Height as below.
1 2 3 4 |
ScaledLayout1->OriginalWidth=100; ScaledLayout1->OriginalHeight=100; ScaledLayout1->Width=200; ScaledLayout1->Height=200; |
GridLayout
1 2 |
GridLayout1->ItemWidth=256; GridLayout1->ItemHeight=256; |
A GridLayout (TGridLayout) is a container with grids for graphical objects that can arrange the objects. It is good to arrange matrix based objects.
1 2 |
GridLayout1->ItemWidth=256; GridLayout1->ItemHeight=256; |
FlowLayout
FlowLayout (TFlowLayout) is a control that arranges its child controls as if they were words in a paragraph. The direction of the controls flow can be from left to right or from right to left. To change the direction, set the FlowDirection property. Changing the direction does not change the line of the control, only the order of the controls on each line.
Spliter
Spliter (TSplitter) divides the client area of its previous area into resizable panes. So user can easily resize both panes (i.e Panels). It should be Aligned to two panes, You can set its orientation to Vertical or Horizontal by using Align to Left, Right or Top, Bottom.
In some operations you may need to arrange these two panes by its position;
1 2 3 4 |
int x=Splitter1->Poisition->X; int y=Splitter1->Poisition->Y; |
Design. Code. Compile. Deploy.
Start Free Trial
Free C++Builder Community Edition