Elem is the base object for both the Area Object and the Gizmo Object.
Elem is the base object for both the Area Object and the
Gizmo Object. It is the wrapper for the Peer Object which is the
WPF Form Object the same name. For this reason the
WPF Forms namespace cannot be used
in
this and other modules.
The peer.tag
field points back at the Elem object.
Many standard methods are bound to this object. A few inspect the object they are called on behalf of and modify their behavoir accordingly. Alternately, the standard method's behavoir can be changed by overriding the method in the subclass.
Must be registered with
Set with the @x@Elem.peer.setBackColor and @x@Elem.peer.setForeColor to directly change the value Must be registered with
Many methods are are 'Chainable' in that they return the Elem instance. This means several methods can be used using the return value of the previous method call.
If not used or not assigned to a $vbl cast to [void] to avoid PowerShell issues of "Cannot convert the "System.Object[]"
Field | Format | Description |
---|---|---|
$bFill | [boolean] | : fill Gizmo to container. set $true by setFill Method |
$bGizmo | [boolean] | : Gizmo not Area if true. set $true by specific constructor. |
$bHaveCH | [boolean] | have installed onClick handler |
$bHaveFH | [boolean] | have installed onFocusLost handler |
$bHidden | [boolean] | : area not displayed. set by setHidden Method |
$bHorz | [boolean] | : Use horizontal layout. set $true by setHorz Method |
$bLayDirty | [boolean] | : rebuild layout, it is dirty. set $true when events require layout change. |
$bUseVScr | [boolean] | : True if to manage Vert Scroll, Set externally. |
$clickMate | [ElemMate] | : onClick with context. V2 handler superceeds onClick |
$dynH | [int32] | EC9B28 - dynamic extra for scroll |
$elemDisabled | [boolean] | future |
$focusMate | [ElemMate] | : onFocusLost with context. |
$form | [Form] | : owning form. null for form itself |
$hgt | [int32] | : calculated height |
$marTop | [int32] | inner margins of kids on first/last elem |
$mate | [Elem] | To connect elems (eg clear link for logger) |
$maxW | [int32] | EC9B28 - scroll support |
$onClick | [scriptblock] | for clickable gizmos (Obsolete) |
$par | [Elem] | : immediate parent. set by constructor |
$peer | [System.Object] | : The Peer Object we manage with this class |
$peerW | [int32] | Original peer size |
$reqW | [int32] | EC9B28 - actual required |
$tied | [System.Object] | : Related object (such as Task Class |
$wid | [int32] | : calculated width |
ToString Returns a summary of the *Elem* instance
backColor sets the background (text) color of the *Elem* using the registered color $col. Chainable.
clickHandler Creates an onClick handler. If $em is null it removes the handler.
color returns color registered with @@m.Form-regColor
detailStr Returns a detailed summary of the *Elem* instance
dock sets the docking flag of the *Elem*. See @@link.layout-alg. Chainable.
focusHandler Creates an onLostFocus handler. If $em is null it removes the handler.
font returns font registered with @@m.Form-regFont
foreColor sets the foreground (text) color of the *Elem* using the registered color $col. Chainable.
hidePeer Hides or shows a *Elem* according to the $hide parameter. Chainable. The *Elem* still occupies space. See @@m.Elem-setHidden.
hook Insert *Elem* address into given object *hook* field. Chainable.
regName Register the `elem.name` using @@m.Form-regElem to be used by @@m.Form-findElem
setAbs sets the absolute width and height of the *Elem*. See @@link.layout-alg. Chainable.
setBackColor sets the background color of the *Elem*. Chainable.
setDisabled Enables or Disables an *Elem*. Only meaningful for @@c.Gizmo. Chainable.
setFill sets the $bFill flag to $true. See @@link.layout-alg. Chainable.
setFont sets the font of the *Elem* using a registered font style name. See @@m.Form-regFont. Chainable.
setForeColor sets the foreground (text) color of the *Elem*. Chainable.
setGap sets the left and right gap (padding). See @@link.layout-alg. Chainable.
setHidden Hides or shows a *Elem* and its @@link.peer according to the $hide parameter. Chainable. The *Elem* will not occupy space if hidden. See @@m.Elem-hidePeer.
setHorz sets the $bHorz flag to $true. See @@link.layout-alg. Chainable.
setMar sets the left and right margins to $x. sets top and bottom mat=rigins to $y. See @@link.layout-alg. Chainable.
setMar sets the left, right, top and bottom margins. See @@link.layout-alg. Chainable.
setMaxHgt sets the maximum height of the *Elem*. Required for scroll support. See @@link.layout-alg. Chainable.
setMaxWid sets the maximum width of the *Elem*. Required for scroll support. See @@link.layout-alg. Chainable.
setName sets the name of the *Elem*. Typically used to find element using @@m.Form-findElem. Chainable.
setPeer Used by a constructor to set the @@link.peer.
setText sets the text of the @@link.peer for the the *Elem*. Chainable.
[String] ToString ()
Returns a summary of the Elem instance
[Elem] backColor ( [string]$col)
Parameter Format Description
$col string color code
sets the background (text) color of the Elem using the registered color $col. Chainable.
[Elem] clickHandler ( [ElemMate]$em)
Parameter Format Description
$em ElemMate contextual mate
Creates an onClick handler. If $em is null it removes the handler.
The onclick handler will be passed the ?@Elem@? and the ctx object value from the ?@ElemMate@?
If the link is diabled the handler is not called even if this interface is called.
[string] color ( [string]$name)
Parameter Format Description
$name string name to lookup
returns color registered with regColor Method
[String] detailStr ()
Returns a detailed summary of the Elem instance
[Elem] dock ( [string]$dock)
Parameter Format Description
$dock string parm description missing
sets the docking flag of the Elem. See Layout Algorithm. Chainable.
[Elem] focusHandler ( [ElemMate]$em)
Parameter Format Description
$em ElemMate contextual mate
Creates an onLostFocus handler. If $em is null it removes the handler.
The onLostFocus handler will be passed the ?@Elem@? and the ctx object value from the ?@ElemMate@?
This can be used to validate the input
[System.Drawing.Font] font ( [string]$name)
Parameter Format Description
$name string name to lookup
returns font registered with regFont Method
[Elem] foreColor ( [string]$col)
Parameter Format Description
$col string color code
sets the foreground (text) color of the Elem using the registered color $col. Chainable.
[Elem] hidePeer ( [boolean]$hide)
Parameter Format Description
$hide boolean $true to hide, $false to reveal
Hides or shows a Elem according to the $hide parameter. Chainable. The Elem still occupies space. See setHidden Method.
[Elem] hook ( [Object]$obj)
Parameter Format Description
$obj Object parm description missing
Insert Elem address into given object hook field. Chainable.
This legacy method allows an event handler to access an Elem
[Elem] regName ()
Register the elem.name
using regElem Method to be used by
findElem Method
Chainable
[Elem] setAbs ( [int32]$w, [int32]$h)
Parameter Format Description
$w int32 width in pixels
$h int32 height in pixels
sets the absolute width and height of the Elem. See Layout Algorithm. Chainable.
[Elem] setBackColor ( [string]$col)
Parameter Format Description
$col string color code
sets the background color of the Elem. Chainable.
[Elem] setDisabled ( [boolean]$disable)
Parameter Format Description
$disable boolean $true to disable, $false to enable
Enables or Disables an Elem. Only meaningful for Gizmo Object. Chainable.
This is a virtual disabling and requires the GUI logic to ignore a 'disabled' element.
[Elem] setFill ()
sets the $bFill flag to $true. See Layout Algorithm. Chainable.
[Elem] setFont ( [string]$fontName)
Parameter Format Description
$fontName string registered font name. See
sets the font of the Elem using a registered font style name. See regFont Method. Chainable.
[Elem] setForeColor ( [string]$col)
Parameter Format Description
$col string color code
sets the foreground (text) color of the Elem. Chainable.
[Elem] setGap ( [int32]$w, [int32]$h)
Parameter Format Description
$w int32 width in pixels
$h int32 height in pixels
sets the left and right gap (padding). See Layout Algorithm. Chainable.
[Elem] setHidden ( [boolean]$hide)
Parameter Format Description
$hide boolean $true to hide, $false to reveal
Hides or shows a Elem and its Peer Object according to the $hide parameter. Chainable. The Elem will not occupy space if hidden. See hidePeer Method.
[Elem] setHorz ()
sets the $bHorz flag to $true. See Layout Algorithm. Chainable.
[Elem] setMar ( [int32]$x, [int32]$y)
Parameter Format Description
$x int32 parm description missing
$y int32 parm description missing
sets the left and right margins to $x. sets top and bottom mat=rigins to $y. See Layout Algorithm. Chainable.
[Elem] setMar ( [int32]$lft, [int32]$rgt, [int32]$top, [int32]$bot)
Parameter Format Description
$lft int32 left margin width in pixels
$rgt int32 right margin width in pixels
$top int32 top margin width in pixels
$bot int32 bottom in pixels
sets the left, right, top and bottom margins. See Layout Algorithm. Chainable.
[Elem] setMaxHgt ( [int32]$h)
Parameter Format Description
$h int32 height in pixels
sets the maximum height of the Elem. Required for scroll support. See Layout Algorithm. Chainable.
[Elem] setMaxWid ( [int32]$w)
Parameter Format Description
$w int32 width in pixels
sets the maximum width of the Elem. Required for scroll support. See Layout Algorithm. Chainable.
[Elem] setName ( [string]$name)
Parameter Format Description
$name string name to lookup
sets the name of the Elem. Typically used to find element using findElem Method. Chainable.
[void] setPeer ( [System.Object]$peer)
Parameter Format Description
$peer System.Object The Form Object
Used by a constructor to set the Peer Object.
[Elem] setText ( [string]$text)
Parameter Format Description
$text string parm description missing
sets the text of the Peer Object for the the Elem. Chainable.
Copyright © 2018-2021, 2022, Rexcel System Inc.