Tipswip   >   Windows   >   Windowsizelocation   >   Window Class

Window Class

The window instance size is set during the $construct of the window. This allows the window to be sized and located before the user sees it. The $contruct calls "oWindowSizes" asking it to set the size and location of the window.

The window instance size is stored during the $destruct of the window. The $destruct calls "oWindowSizes" and asks it to store the size and location of the window instance when it is closed.

$construct

$construct OF THE BASE WINDOW SUPERCLASS

Set the window size to the last time the user closed it, or the default sizes Do oWindowSizes.$setWindowSize($cinst)

The base window superclass $construct includes the above line of code "oWindowSizes" is a local variable, Type=Object, Subtype pointed to "oWindowSizes". Sending the parameter $cinst of the window instance which is being $constructed allows "oWindowSizes" to get and set the window size and location for this window instance. Since this occurs during the $construct of the window, "oWindowSizes" can change the position and size of the window before the user sees it.

I use the window instance name [$cinst().$name] for my window titles, names, etc.

$destruct

$destruct OF THE BASE WINDOW SUPERCLASS

Save the window size, so it will reopen at this size for this user.

Do oWindowSizes.$saveWindowSize($cinst)

The base window superclass $destruct includes the above line of code. "oWindowSizes" is a local variable, Type=Object, Subtype pointed to "oWindowSizes". Sending the parameter $cinst of the window instance which is being closed allows "oWindowSizes" to get the window size and location for this window, and then store them in the windows used list.

I use the window instance name [$cinst().$name] for my window titles, names, etc.