Unit 'MUIClass.Window' Package
[Overview][Types][Classes][Index] [#MUIClass]

TMUIWindow.Open

This little attribute can be used to open and close a window.

Declaration

Source position: MUIClass.Window.pas line 125

public property TMUIWindow.Open : Boolean
  read FOpen
  write SetOpen
  default False;

Description

When opening a window, MUI does lots of stuff to calculate sizes and positions of all gadgets. Minimum and maximum window sizes will be adjusted automatically.

When the minimum size of a window is too big to fit on the screen, MUI tries to reduce font sizes and does a new calculation. You should always design your windows to fit on a 640*200 screen with all fonts set to topaz/8.

When a window is closed (and you specified a ID), MUI remembers its position and size and uses these values during the next opening.

After setting Open to True, you should test if MUI was able to open the window by getting the attribute again. If you don't and if this was the only window of your application, the user won't be able to do any input and your application will seem to hang.

Example:

Window.Open := True;
if not Window.Open then
begin
  MUI_Request(MUIApp, 0, 0, 0, 'OK', 'Failed to open window.');
  Halt(20);
end;

The main Window will be automatically opened on MUIApp.Run()


Documentation generated on: 2024-06-14