Dyalog / ewc-client

Other
1 stars 4 forks source link

Support the Attach property #97

Open mkromberg opened 10 months ago

mkromberg commented 10 months ago

DemoSplitters has been updated to use the Attach property. In the demo it is only set on a Grid, List and TreeView object - but the property should be supported by all classes.

The List view has Attach Top Left Top Right, while the TreeView has Top Left Top Left. Notice in the first 7 seconds of the video how the right edge of the List follows the splitter, but the right edge of the TreeView does not move because it is completely anchored top the top left.

The Grid has Top Left Bottom Right. Notice in the second section of the recording how it follows the corners of its parent and always almost fills the SubForm.

In the final few seconds of the video where the form is resized (this is not currently possible in JSWC, but the effect should be the same if the Size property of the Form is changed), how the horizontal splitter moves proportionally to the size of the form - this is because the Splitter does not have Attach set. If we set the Attach property of the Splitter, we would be able to control whether it was anchored to the top or bottom edge of the form.

https://github.com/mqasim23/jswc-web/assets/2799045/b7389667-a96c-4f0f-95e4-c3d41ce59d4d

mkromberg commented 10 months ago

Attach should be supporyed for the following objects:

Animation Button ButtonEdit Calendar ColorButton Combo ComboEx CoolBar DateTimePicker Edit Grid Group HTMLRenderer Label List ListView MDIClient ProgressBar RichEdit Scroll SM Spinner Static StatusBar StatusField SubForm TabBar TabBtn TabControl ToolBar ToolControl TrackBar TreeView UpDown

mkromberg commented 10 months ago

Demos now sets Attach (top right top right) for the demo selection controls. If you run DemoSplitters and change the size to [800,900], the combo and button should keep their distance to the top right corner. At the moment they are left 100px too far from the right:

image