Discussions related to Visual Prolog
User avatar
Ferenc Nagy
VIP Member
Posts: 215
Joined: 24 Apr 2007 12:26

Anchored vs. docked controls

Unread post by Ferenc Nagy »

I know that anchors and docking of controls exclude each other.
Is there any tutorial explaining and comparing the two ways of sizing and positioning of the controls within a form?
TIA, Regards,
Frank Nagy
User avatar
Thomas Linder Puls
VIP Member
Posts: 1203
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

No, such a tutorial does not exist.

Docking is good for filling an area with "large resizable" controls like (multiline-)editors, trees, lists, group boxes, ....

Anchoring is better to place "fixed sized"/small controls like buttons, edit controls, radio buttons, ...

As you mention it is not possible to mix the two concepts inside a single window, but you can for example use docking at an outer level and let one or more of the controls be a group box (with or without frame) the children of such a group box can then use anchoring. (The switch can also go the other way, from anchor to docking).

Docking does however (in its present form) have the rather huge drawback that the creation order (which is also the tab order) has a crucial influence on the layout. So unfortunately you will often get an undesirable tab order in order to obtain a certain layout.
Regards Thomas Linder Puls
Post Reply