This function moves the dialog window to the given location. Call this function to override the default automatic positioning of the dialog window. The dialog will be pinned so that it is at least partly onscreen.
This function can be useful for displaying a dialog in a position in which it was placed during prior use.
FUNCTION SetLayoutDialogPosition(
dialogID : LONGINT;
left : INTEGER;
top : INTEGER): BOOLEAN;def vs.SetLayoutDialogPosition(dialogID, left, top):
return BOOLEAN| Name | Type | Description |
|---|---|---|
| dialogID | LONGINT | Index of the dialog. |
| left | INTEGER | Location of left edge of dialog in pixels. |
| top | INTEGER | Location of top edge of dialog in pixels. |
PROCEDURE Dialog;
VAR
id,tmpInt : INTEGER;
result : BOOLEAN;
PROCEDURE dialog_Handler(VAR item : LONGINT; data : LONGINT);
BEGIN
CASE item OF
SetupDialogC:
BEGIN
result:=SetLayoutDialogPosition(id,100,100);
END;
1: ;
2: ;
END;
END;
BEGIN
id:=CreateLayout('Title',FALSE,'OK','Cancel');
CreateStaticText(id,100,'Message',20);
SetFirstLayoutItem(id,100);
tmpInt:=RunLayoutDialog(id,dialog_Handler);
END;
RUN(Dialog);VS Functions: GetLayoutDialogPosition
Availability: from VectorWorks11.0