ObjectDCL Banner

Form_Center Method

Description

This method will center dialogs to the center of the screen.

Parameters

MyDialogReference
Reference to the dialog.
ProjectFile
String identifying the project as it was passed in LoadProject.
DialogName
String identifying the dialog by name.
Width
Integer identifying the width to apply.
Height
Integer identifying the height to apply.

Return Values

Returns the following according to the situation:

  • T when successful.
  • Nil if the form is not found or the form does not support the operation.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_Form_Center 
		MyDialogReference [as Reference]
		[Optional] Width [as Integer]
		[Optional] Height [as Integer])

An alternative convention is to identify the control by providing the project file, the dialog name and the control name:

CopyCode imageCopy Code
(Odcl_Form_Center
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		[Optional] Width [as Integer]
		[Optional] Height [as Integer])

Remarks

Applies only to modal and modeless dialogs.

Applies For

Modal, Modeless.

Example

CopyCode imageCopy Code
; Center the dialog
(Odcl_Form_Center MyProject_MyForm)

See Also

Form_Show