I don't think you can specify minimal height/width of controls in LayoutControl. You could of course use the standard constraints
property, it will work, but will look ugly.
The question though is what exactly are you trying to achieve ? LayoutControl attempts to adjust it's controls sizes so that everything fits as well as possible. With many controls packed in too little space the scrollbars appear, but what else can happen ?
The key to setting up a nice resizable layout is to adjust the AlignHoriz
and AlignVert
properties of layout items/groups. Set these to ahClient/avClient
for controls that are resizable, like say a Memo or a Grid. Also you generally want the the LayoutControls's AutoContentSizes
to be [acsWidth,acsHeight]
And speaking of versions, I would recommend you upgrade to latest build and try the LayoutControl V2, which has some additional features compared to v1 such as support for splitters and tabs.
Here's an example of a simple form that resizes logically, you can paste it to an empty form:
object dxLayoutControl1: TdxLayoutControl
Align = alClient
AutoContentSizes = [acsWidth, acsHeight]
object Edit1: TEdit
BorderStyle = bsNone
end
object Button1: TButton
end
object Memo1: TMemo
BorderStyle = bsNone
end
object dxLayoutControl1Group_Root: TdxLayoutGroup
ShowCaption = False
Hidden = True
ShowBorder = False
object dxLayoutControl1Group1: TdxLayoutGroup
AutoAligns = [aaHorizontal]
AlignVert = avClient
object dxLayoutControl1Group2: TdxLayoutGroup
ShowCaption = False
Hidden = True
LayoutDirection = ldHorizontal
ShowBorder = False
object dxLayoutControl1Item1: TdxLayoutItem
AutoAligns = [aaVertical]
AlignHorz = ahClient
Control = Edit1
end
object dxLayoutControl1Item2: TdxLayoutItem
ShowCaption = False
Control = Button1
ControlOptions.ShowBorder = False
end
end
object dxLayoutControl1Item3: TdxLayoutItem
AutoAligns = [aaHorizontal]
AlignVert = avClient
Control = Memo1
end
end
end
end
Hope it helps