
Window
Window Methods
| Window() | Constructor for the Window class |
| XPos() | Returns the X position of the window |
| YPos() | Returns the Y position of the window |
| Width() | Returns the width of the window in pixels |
| Height() | Returns the height of the window in pixels |
| SetPos() | Sets a new X, Y position for the window |
| SetSize() | Sets a new size (width and height) for the window |
| Font() | Returns reference to current Font object associated with window |
| SetFont() | Sets a new Font object to be associated with window |
| ForeColor() | Returns the current foreground color |
| BackColor() | Returns the current backgrond color |
| SetForeColor() | Sets the current foreground color |
| SetBackColor() | Sets the current background color |
| WindowText() | Returns the current text associated with the window |
| SetWindowText() | Sets the current text associated with the window |
| Parent() | Returns the parent window (null for top-level window) |
| WindowId() | Returns window Id for this window (automatic or manual) |
| SetWindowId() | Sets the window id manually for this window |
| Hide() | Hides the window from the display |
| Show() | Shows the window and draws it onto the display |
| Enable() | Enables the window and allows U/I event handling |
| Disable() | Disables U/I interaction and event handling within the window |
| IsEnabled() | Returns true if the window is enabled |
| IsDisabled() | Returns true if the window is disabled |
Derived Classes
Frame, Dialog, SelectBar, SelectItem, Control
See Also
Class Hierarchy, Display, WindowEvent, WindowParentException, Font, Color
public method Window(int XPos, int YPos, int Width, int Height)
Parameters
XPos
One based X position of window relative to parent
YPos
One based Y position of window relative to parent
Return Value
None
Description
Constructor for the Window class. The base information such as position and size is passed in, but can be changed.
Window Class
public method<int> XPos(bool Relative = true)
Parameters
Relative
Returns position relative to parent if true, absolute position if false
Return Value
One based X position relative to parent or absolute position
Description
This method returns the one based X position of the window. If the "Relative" flag is true, the position is relative to its parent in pixels (horizontal direction). A position of 1, 1 will be directly on top of the parent. If the "Relative" flag is false, the position is an absolute screen position.
Note that the "Relative" flag is currently not supported. The position returned is always an absolute screen position.
Window Class
public method<int> YPos(bool Relative = true)
Parameters
Relative
Returns position relative to parent if true, absolute position if false
Return Value
One based Y position relative to parent
Description
This method returns the one based Y position of the window. If the "Relative" flag is true, the position is relative to its parent in pixels (vertical direction). A position of 1, 1 will be directly on top of the parent. If the "Relative" flag is false, the position is an absolute screen position.
Note that the "Relative" flag is currently not supported. The position returned is always an absolute screen position.
Window Class
public method<int> Width()
Parameters
None
Return Value
Width of the window
Description
This method returns the width of the window in pixels (horizontal direction).
Window Class
public method<int> Height()
Parameters
None
Return Value
Height of the window
Description
This method returns the height of the window in pixels (vertical direction).
Window Class
public method SetPos(int XPos, int YPos)
Parameters
XPos
New X position of window (one based)
YPos
New Y position of window (one based)
Return Value
None
Description
This method sets a new position for the window relative to its parent (one based) and redraws the window at its new location.
Window Class
public method SetSize(int Width, int Height)
Parameters
Width
New width of window (one based)
Height
New height of window (one based)
Return Value
None
Description
This method sets a new size for the window given the width and height and redraws the window.
Window Class
public method<Font> Font()
Parameters
None
Return Value
Current font for the window
Description
This method returns the Font object which is currently associated with the window.
Window Class
public method SetFont(Font NewFont)
Parameters
NewFont
New Font for the window
Return Value
None
Description
This method sets a new font to be associated with the window.
Window Class
public method<Color> ForeColor()
Parameters
None
Return Value
Foreground color for the window
Description
This method returns the current foreground color for the window.
Window Class
public method<Color> BackColor()
Parameters
None
Return Value
Background color for the window
Description
This method returns the current background color for the window.
Window Class
public method SetForeColor(Color ForeColor)
Parameters
ForeColor
New foreground Color for the window
Return Value
None
Description
This method sets a new foreground color to be associated with the window.
Window Class
public method SetBackColor(Color BackColor)
Parameters
BackColor
New background Color for the window
Return Value
None
Description
This method sets a new background color to be associated with the window.
Window Class
public method<string> WindowText()
Parameters
None
Return Value
Text associated with the window
Description
This method returns the text currently associated with the window. How this value is used depends on the window. For a Frame, it is the title of the window. For a button or an edit control, it is the text displayed in the control, etc.
Window Class
public method SetWindowText(string Text)
Parameters
Text
New text for the window
Return Value
None
Description
This method sets the text to be associated with the window. How this value is used depends on the window. For a Frame, it is the title of the window. For a button or an edit control, it is the text displayed in the control, etc.
Window Class
public method<Window> Parent()
Parameters
None
Return Value
Parent window
Description
This method returns the reference to this window's parent window.
Window Class
public method<int> WindowId()
Parameters
None
Return Value
Window Id for this window
Description
This method returns the window Id associated with this window. The framework automatically assigns a unique internal number to each window, but it can be overridden by calling SetWindowId() - in which case any uniqueness requirements would need to be handled manually as well.
Window Class
public method SetWindowId(int WindowId)
Parameters
WindowId
New window Id for the window
Return Value
None
Description
This method sets the new window Id to be associated with the window. The framework automatically assigns a unique internal number to each window, and is overridden by manually calling this method. Any uniqueness requirements need to be handled manually as well.
Window Class
public method Hide()
Parameters
None
Return Value
None
Description
This method hides the window from the screen and recursively hides all child windows as well.
Window Class
public method Show()
Parameters
None
Return Value
None
Description
This method shows the window on the screen and recursively shows all child windows as well (unless a child was manually hidden previously).
Window Class
public method Enable()
Parameters
None
Return Value
None
Description
This method enables the window and if applicable, makes it available for user input. All event handling is also turned on for the window.
.
Window Class
public method Disable()
Parameters
None
Return Value
None
Description
This method disables the window and if applicable, disables all user input and all event handling for the window. Some window types such as Button classes also "gray out" the item when disabled. Others, such as SelectItem (MenuItem and ToolBarItem) do not gray out the window when disabled, but they provide a separate method specifically to gray it out (SelectItem.Gray()).
.
Window Class
public virtual method<bool> IsEnabled()
Parameters
None
Return Value
True if checked
Description
This method returns true if the item is currently enabled (normal text and provides UI interactio) and false if not enabled.
Window Class
public virtual method<bool> IsDisabled()
Parameters
None
Return Value
True if checked
Description
This method returns true if the window is currently disabled (no UI interaction) and false if not enabled.
Window Class