Older Newer
Tue, 17 Dec 2019 02:16:08 . . . . SyneRyder [Initial function definition]


Changes by last author:

Added:
= setCtlAnchor =

== Syntax ==

int setCtlAnchor(int n, int flags)

== Arguments ==

:n

::The number of the control to modify

:flags

::A combination of the anchoring constants ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_TOP and ANCHOR_BOTTOM.

== Return ==

Returns false if the control number is out of range or not in use, true otherwise.

== Description ==

Changes how a control is repositioned when the dialog is resized.

== Example ==

<code>

%fml

ctl[0]: STATICTEXT, Anchor=ANCHOR_TOP|ANCHOR_RIGHT, Text="Resize window to see anchor effect", Size=(120,*)

ctl[4]: PUSHBUTTON, Text="Top", Size=(60,*)

ctl[5]: PUSHBUTTON, Text="Left", Size=(60,*)

ctl[6]: PUSHBUTTON, Text="Right", Size=(60,*)

ctl[7]: PUSHBUTTON, Text="Bottom", Size=(60,*)

ctl[8]: PUSHBUTTON, Text="Bottom Right", Size=(60,*)

setCtlAnchor(4, ANCHOR_TOP);

setCtlAnchor(5, ANCHOR_LEFT);

setCtlAnchor(6, ANCHOR_RIGHT);

setCtlAnchor(7, ANCHOR_BOTTOM);

setCtlAnchor(8, ANCHOR_RIGHT | ANCHOR_BOTTOM);

</code>

== See Also ==

updateAnchors