Kerry Busby
03.08.2006
Can I also suggest that the CaptionOptions.Layout property also be able to be changed at runtime.
After doing some experimenting yesterday I found that the ExpressLayout Control will sometimes change the CaptionOptions.Layout property of all TdxLayoutItems within a group if you move a TdxLayoutItem from one group to another so the ability to change this caption layout property at run time is also required.
Run the attached project, select the Customize Layout button and move the controls between groups. The default caption alignment will be changed depending on where the caption is dropped to but can no longer be changed back to it's original setting at run time.
This will also show how the memo field and the associated TdxLayoutItem is sometimes set to a fixed woidth depending on how the TdxLayoutItems are placed.
"After doing some experimenting yesterday I found that the ExpressLayout Control will sometimes change the CaptionOptions.Layout property of all TdxLayoutItems within a group if you move a TdxLayoutItem from one group to another so the ability to change this caption layout property at run time is also required."
LayoutControl tries to keep the UI it provides as consistent as possible. That is why it changes the CaptionOptions.Layout of the moved item depending on the CaptionOptions.Layout values of the items already in the group.
I have created another suggestion on your behalf regarding this issue - AS2904.
"This will also show how the memo field and the associated TdxLayoutItem is sometimes set to a fixed woidth depending on how the TdxLayoutItems are placed."
Notice that the layout item dxLayoutControl1Item5 associated with the memo has AutoAligns.aaHorizontal set to True - that means layout control will decide which AlignHorz value this layout item will have depending on the layout direction inside the layout group. You should set AutoAligns.aaHorizontal = False and AlignHorz = ahClient for this layout item to make this alignment permanent.