Rollout Floaters and Dialogs Position and Size Handling Fixed

MAXScript Language Improvements in 3ds Max 5

The handling of size and position has been made consistent within and between MXS rollout floaters and dialogs. Previously, the creation size specified the size of the entire window, now it specifies the size of the client window. Since, depending on OS and small/large font selection, the size of the window border varies, you never knew quite what size to make your dialog or floater. Now, in all cases, size refers to the window's client area, and position refers to the window. This is also true for values passed in to the moved and resized handlers.

Premature calls to the moved and resized handlers have been removed. These handlers are now only called when the user changes the position or size of the dialog or floater via the UI or script.

NOTE:

Sizes of MAXScript-generated dialogs will be slightly larger than in older versions.

New properties added:

<rollout>.inDialog Boolean, read-only.

Signifies whether the rollout is currently displayed in a dialog created via createDialog <rollout>. Always valid.

<rollout>.inViewport Boolean, read-only.

Signifies whether the rollout is currently displayed in a viewport. Always valid.

<rollout>.open Boolean, read-only.

Signifies whether the rollout is currently displayed. Valid when the rollout is displayed in the command panel or in a rollout floater.

<rollout>.dialogBar Boolean, read-only.

Signifies whether the rollout floater is used as a dialog bar. Always valid.

<rollout>.height Integer

Get/Set the height of the rollout in pixels. Valid when rollout is in the command panel, in a rollout floater, or in a dialog.

<rollout>.width Integer

Get/Set the width of the rollout in pixels. This property exists only when the rollout is in a dialog.

New method added:

<Point2>GetDialogSize <rollout>

returns the size of the window's client area.

Equivalent to

point2 <rollout>.width <rollout>.heigh

See Also