Namespace: Consultingwerk.Util
Class 
WidgetHelper Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:WidgetHelper
Syntax:Static methods only, Protected constructor to disallow
instance creation
Author(s):Mike Fechner, Consultingwerk Ltd.
Created:Tue Dec 15 06:22:09 CET 2009
Notes:This file is intended for GUI for .NET only



Top Method Summary
Options Name Purpose
+ Consultingwerk.Point AbsolutePositionOnWindow (handle) Returns the absolute position of a Widget in a Window
+ AbsolutePositionOnWindow (handle, integer, integer) Returns the absolute position of a Widget in a Window
+ AddCalendarPopups (handle, Control, integer, integer) Overlays widgets of the given type with .NET Controls of the given type (i.e. BUTTON Widget -> UltraButton Control).
+ LOGICAL CanFindWidgetOfType (handle, character) Returns true when a widget of the provided type existis in the frame
+ LOGICAL CanFindWidgetsBelowHeight (handle, integer) Returns true when a widget existis below the given pixel (row)
- ClickHandler (Object, EventArgs) Event handler for the Click event of UltraButton Controls created by ReplaceWidget
# ClosePopup () Closes the active PopupControlContainer component
+ INTEGER Count (handle) Returns the number of widget handles in the given widget chain
- DateLeaveHandler (Object, EventArgs) Event handler for the Leave event of the Date Popup's
+ DatePopup (Control) Opens the date picker popup
- DatePopupClickHandler (Object, EventArgs) Event handler for the Click handler of the DatePopup Buttons
- DatePopupDateChangedHandler (Object, EventArgs) Event handler for the Changed event of the Date Popup Control
+ CHARACTER FilterByPrivateData (character, FilterByPrivateDataOperatorEnum, character) Filters a list of widget handle by the private data
+ CHARACTER FindAllFrames (handle) Returns a comma delimited list of all Frames in a parent
+ CHARACTER FindAllVisibleFrames (handle) Returns a comma delimited list of all visible Frames in a parent
+ CHARACTER FindAllWidgetsOfType (handle, character) Returns a comma delimited list of all Widgets in a parent of a given type
+ CHARACTER FindAllWidgetsOfTypeAndPrivateData (handle, character, character) Returns a comma delimited list of all Widgets in a parent of a given type with the given PRIVATE-DATA value
+ CHARACTER FindAllWidgetsOfTypeRecursive (handle, character) Returns a comma delimited list of all Widgets in a parent of a given type
+ HANDLE FindBottomMostWidgetNotOfType (handle, character) Searches the Widget Tree of the bottom most widget not of the given type
+ HANDLE FindBottomMostWidgetOfType (handle, character) Searches the Widget Tree frame for the bottom-most widget of the given Type
+ System.Drawing.Point FindBottomRightMostPointInWindow (handle) Determines the bottom right most used point in a Window
+ System.Drawing.Point FindBottomRightMostPointInWindow (handle, character) Determines the bottom right most used point in a Window
+ System.Drawing.Point FindBottomRightMostPointInWindow (handle, character, character) Determines the bottom right most used point in a Window
+ HANDLE FindChildWidgetByName (handle, character) Searches for a Widget with the given name in the Parents (Frame or Window) widget tree
+ HANDLE FindChildWidgetByScreenValueAndType (handle, character, character) Searches for a the first Widget of the given SCREEN-VALUE in the Parents (Frame or Window) widget tree
+ HANDLE FindChildWidgetOfType (handle, character) Searches for a the first Widget of a TYPE in the given list of types in the Parents (Frame or Window) widget tree
+ CHARACTER FindChildWidgetsByName (handle, character) Searches for all Widget with the given names in the Parents (Frame or Window) widget tree, the WidgetNames are space delimited, so that this function is compatible with AppBuilder generated lists
+ System.Windows.Forms.Control FindControlForWidget (Control, handle) Returns the reference to the .NET Controlt that is associated with the passed in widget handle (using the Tag property of the .NET Control)
+ CHARACTER FindFramesWithinRectangle (handle) Locates all Frames that are located in the FRAME that contains the source rectangle (could be Rectangle, Frame or COM-FRAME)
+ System.Drawing.Point FindInnerMostPoint (handle) Returns a System.Drawing.Point with the coordinates of the innermost used point
+ HANDLE FindLowestWidgetOfType (handle, character, decimal) Locates the lowest "hangig" widget in a frame that starts at a row above the pdeTopLimit and is of a type in the type list.
+ System.Drawing.Point FindOuterMostPoint (handle) Returns a System.Drawing.Point with the coordinates of the outermost used point - the actual used bottom and right edge of the frame contents.
+ CHARACTER FindRectanglesSurroundingButtonsOnly (handle) Returns a comma-delimited list of rectangles the do only surround buttons
+ System.Drawing.Point FindTopLeftMostPointInWindow (handle) Determines the top left most used point in a Window
+ System.Drawing.Point FindTopLeftMostPointInWindow (handle, character) Determines the top left most used point in a Window
+ System.Drawing.Point FindTopLeftMostPointInWindow (handle, character, character) Determines the top left most used point in a Window
+ HANDLE FindTopMostWidgetNotOfType (handle, character) Searches the Widget Tree of the top most widget not of the given type (accepts a list of types)
+ HANDLE FindTopMostWidgetOfType (handle, character) Searches the Widget Tree frame for the top-most widget of the given Type
+ CHARACTER FindWidgetsInRectangle (handle, character) Returns a comma-delimited list of all widgets of the given type in located within the boundaries of a rectangle (in the same frame)
+ HANDLE FindWidgetWithName (character, character) Locates the Widget handle with the given name based on a list of widget handles
+ HANDLE FindWindow (handle) Searches the Widget Tree Up for the next Window
+ GetMinSize (handle, integer, integer) Walks through all widgets in a FRAME (non-recursively) and returns the minimum size for the FRAME in pixels
+ HideWidgets (handle, character) Hides all widgets of the given type in the frame
+ HideWidgets (handle, decimal, character) Hides all widgets of the given type in the frame
+ LeftAlignWidgetLabels (handle, character, character) Left aligns the labels of widgets in a Frame
+ System.Drawing.Image LoadImage (character) Loads an Image
+ INTEGER NumChildren (handle) Returns the number of children of the given Widget
+ CHARACTER OrderWidgetsByColRow (character) Returns a list of widget handles ordered by col and then row on the screen
+ CHARACTER OrderWidgetsByRowCol (character) Returns a list of widget handles ordered by row and then col on the screen
# PopulateWidgetTempTable (character) Populates (fills the
+ RefreshButtons (Control) Refreshes Buttons based on the ABL widget status (UltraButton / BUTTON)
+ System.Windows.Forms.Control ReplaceWidget (handle, Control, Type, integer, integer) Overlays one widget with a .NET Controls of the given type (i.e. BUTTON Widget -> UltraButton Control).
+ System.Windows.Forms.Control ReplaceWidget (handle, Control, Type, integer, integer, logical) Overlays one widget with a .NET Controls of the given type (i.e. BUTTON Widget -> UltraButton Control).
+ ReplaceWidgets (handle, Control, character, Type, integer, integer) Overlays widgets of the given type with .NET Controls of the given type (i.e. BUTTON Widget -> UltraButton Control).
+ ReplaceWidgets (handle, Control, character, Type, integer, integer, logical) Overlays widgets of the given type with .NET Controls of the given type (i.e. BUTTON Widget -> UltraButton Control).
+ SetBackgroundColor (handle, integer) Assigns a Background color to a Widget - only when the color is different from the current background color
+ SetFrameBackgroundColor (handle, integer) Changes the background color of the frame and all contained frames
+ SetFrameBackgroundColor (handle, integer, integer, integer) Changes the background color of the frame and all contained frames and optionally the browse widgets
+ SetFrameBackgroundColor (handle, integer, integer, integer, integer) Changes the background color of the frame and all contained frames and optionally the browse widgets
+ SetFrameBackgroundColor (handle, integer, integer, integer, integer, integer) Changes the background color of the frame and all contained frames and optionally the browse widgets
+ SetFrameBackgroundColor (handle, integer, integer, integer, integer, integer, integer, integer) Changes the background color of the frame and all contained frames and optionally the browse widgets
+ SetFrameBackgroundColor (handle, integer, integer, integer, integer, integer, integer, integer, logical) Changes the background color of the frame and all contained frames and optionally the browse widgets
+ SetFrameBackgroundColor (ISetFrameBackgroundColorParameter) Changes the background color of the frame and all contained frames and optionally the browse widgets
- SetFrameBackgroundColorInternal (ISetFrameBackgroundColorParameter) Changes the background color of the frame and all contained frames and optionally the browse widgets
+ ShowWidgetProperties (handle) Shows a MESSAGE with properties of the widget
+ ShowWidgetProperties (handle, character) Shows a MESSAGE with properties of the widget
+ CHARACTER SideLabelHandlesInFrame (handle) Returns a comma delimited list of all the side-label-handles in a FRAME
+ LOGICAL WidgetContainedIn (handle, handle) Determines if the inner widget is contained within the outer widget
+ CHARACTER WidgetLabel (handle) Returns a Label of a Widget, the Name - or <invalid> when the Widget is not valid
+ CHARACTER WidgetName (handle) Returns the Name of a Widget - or <invalid> when the Widget is not valid
+ CHARACTER WidgetNames (character) Returns the Names of a list of Widgets - or <invalid> when an entry is not valid

Top Constructor Summary
Options Name Purpose
# WidgetHelper () Protected default constructor.
WidgetHelper () Initializes the static instance of the WidgetHelper


Method Detail
Top

PUBLIC Consultingwerk.Point AbsolutePositionOnWindow (handle)

Purpose: Returns the absolute position of a Widget in a Window
Notes: Traverses nested frames (i.e ADM1, ADM2)

Parameters:
phWidget HANDLE
The handle of the Widget
Returns Consultingwerk.Point
The Consultingwerk.Point that represents the Widget position
Top

PUBLIC AbsolutePositionOnWindow (handle, integer, integer)

Purpose: Returns the absolute position of a Widget in a Window
Notes: Traverses nested frames (i.e ADM1, ADM2)

Parameters:
phWidget HANDLE
The handle of the Widget
pX INTEGER
OUTPUT The absolute X position of the widget
pY INTEGER
OUTPUT The absolute Y position of the widget
Top

PUBLIC AddCalendarPopups (handle, Control, integer, integer)

Purpose: Overlays widgets of the given type with .NET Controls of the
given type (i.e. BUTTON Widget -> UltraButton Control).
Notes:

Parameters:
phParentFieldGroup HANDLE
The field group of the frame the contains DATA FILL-IN widgets
poParentControl System.Windows.Forms.Control
The .NET Control that should become the parent of the popup buttons (parent of the WindowContainer)
piRowOffset INTEGER
The offset in pixels from the top for placing the popup buttons (see EmbeddedWindowForm for details)
piColOffset INTEGER
The offset in pixels from the left for placing the popup buttons (see EmbeddedWindowForm for details)
Top

PUBLIC LOGICAL CanFindWidgetOfType (handle, character)

Purpose: Returns true when a widget of the provided type existis in the frame
Notes: Does not recursively process nested frames

Parameters:
phParent HANDLE
The HANDLE of the Parent FRAME, WINDOW or FIELD-GROUP
pcWidgetTypeList CHARACTER
The List of WIDGET types to search for
Returns LOGICAL
True when a Widget was found, otherwise False
Top

PUBLIC LOGICAL CanFindWidgetsBelowHeight (handle, integer)

Purpose: Returns true when a widget existis below the given pixel (row)
Notes: Useful for knowing if a Browse widget is the bottom-most widget or not
Does not recursively process nested frames

Parameters:
phParent HANDLE
The HANDLE of the Parent FRAME, WINDOW or FIELD-GROUP
piPixels INTEGER
The minumum number of pixels form the top that a widget is search at
Returns LOGICAL
True when a Widget was found, otherwise False
Top

PRIVATE ClickHandler (Object, EventArgs)

Purpose: Event handler for the Click event of UltraButton Controls created
by ReplaceWidget
Notes:

Parameters:
sender System.Object
The System.Object that raised this event
e System.EventArgs
The System.EventArgs with the data for this event
Top

PROTECTED ClosePopup ()

Purpose: Closes the active PopupControlContainer component
Notes:

Top

PUBLIC INTEGER Count (handle)

Purpose: Returns the number of widget handles in the given widget chain
Notes: Counts the passed in widget handle (when valid) and it's siblings.
Helpful to count from the SESSION:FIRST-... references

Parameters:
phWidget HANDLE
The handle of the first widget in the widget chain
Returns INTEGER
The number of widgets in the widget chain
Top

PRIVATE DateLeaveHandler (Object, EventArgs)

Purpose: Event handler for the Leave event of the Date Popup's
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e System.EventArgs
The System.EventArgs with the data for this event
Top

PUBLIC DatePopup (Control)

Purpose: Opens the date picker popup
Notes:

Parameters:
poControl System.Windows.Forms.Control
The reference to the Popup Button Control to open the popup for
Top

PRIVATE DatePopupClickHandler (Object, EventArgs)

Purpose: Event handler for the Click handler of the DatePopup Buttons
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e System.EventArgs
The System.EventArgs with the data for this event
Top

PRIVATE DatePopupDateChangedHandler (Object, EventArgs)

Purpose: Event handler for the Changed event of the Date Popup Control
Notes:

Parameters:
sender System.Object
The reference to the object that raised the event
e System.EventArgs
The System.EventArgs with the data for this event
Top

PUBLIC CHARACTER FilterByPrivateData (character, FilterByPrivateDataOperatorEnum, character)

Purpose: Filters a list of widget handle by the private data
Notes: Supported operators are EQ, BEGINS, MATCHES, NE, BEGINS NOT, MATCHES NOT
Silently ignores invalid handles or widgets that do not support the
private data attribute

Parameters:
pcWidgetHandles CHARACTER
The comma-delimited list of widget handles
poOperator Consultingwerk.Util.Enum.FilterByPrivateDataOperatorEnum
The FilterByPrivateDataOperatorEnum that describes the operator to be used
pcValue CHARACTER
The value to use for comparing the private data, when using the MATCHES Operator, include *
Returns CHARACTER
The list of the Widget handles matching the criteria
Top

PUBLIC CHARACTER FindAllFrames (handle)

Purpose: Returns a comma delimited list of all Frames in a parent
Notes: Does recursively process nested frames and field-groups

Parameters:
phParent HANDLE
The HANDLE of the Parent FRAME, WINDOW or FIELD-GROUP
Returns CHARACTER
A comma-delimited list of contained FRAME handles
Top

PUBLIC CHARACTER FindAllVisibleFrames (handle)

Purpose: Returns a comma delimited list of all visible Frames in a parent
Notes: Does recursively process nested frames and field-groups

Parameters:
phParent HANDLE
The HANDLE of the Parent FRAME, WINDOW or FIELD-GROUP
Returns CHARACTER
A comma-delimited list of contained visible FRAME handles
Top

PUBLIC CHARACTER FindAllWidgetsOfType (handle, character)

Purpose: Returns a comma delimited list of all Widgets in a parent of a
given type
Notes: Does not recursively process nested frames

Parameters:
phParent HANDLE
The HANDLE of the Parent FRAME, WINDOW or FIELD-GROUP
pcWidgetType CHARACTER
A comma delimited list of WIDGET types to search for
Returns CHARACTER
A comma-delimited list of matching WIDGET handles
Top

PUBLIC CHARACTER FindAllWidgetsOfTypeAndPrivateData (handle, character, character)

Purpose: Returns a comma delimited list of all Widgets in a parent of a
given type with the given PRIVATE-DATA value
Notes: Does not recursively process nested frames

Parameters:
phParent HANDLE
The HANDLE of the Parent FRAME, WINDOW or FIELD-GROUP
pcWidgetType CHARACTER
A comma delimited list of WIDGET types to search for
pcPrivateData CHARACTER
A comma delimited list of PRIVATE-DATA values to search for
Returns CHARACTER
A comma-delimited list of matching WIDGET handles
Top

PUBLIC CHARACTER FindAllWidgetsOfTypeRecursive (handle, character)

Purpose: Returns a comma delimited list of all Widgets in a parent of a
given type
Notes: Does recursively process nested frames

Parameters:
phParent HANDLE
The HANDLE of the Parent FRAME, WINDOW or FIELD-GROUP
pcWidgetType CHARACTER
A comma delimited list of WIDGET types to search for
Returns CHARACTER
A comma-delimited list of matching WIDGET handles
Top

PUBLIC HANDLE FindBottomMostWidgetNotOfType (handle, character)

Purpose: Searches the Widget Tree of the bottom most widget not of the given
type
Notes: Typically used to determine the bottom most non BUTTON Widget in a
frame for resizing when all BUTTON's are rendered in an Infragistics
toolbar/ribbon
When pcWidgetType is "BUTTON", we will also ignore rectangles that do
only contain Button widgets.

Parameters:
phParent HANDLE
The Frame handle to look in
pcWidgetType CHARACTER
The Widget type that is ignored when searching for the bottom most widget.
Returns HANDLE
The handle of the bottom most widget
Top

PUBLIC HANDLE FindBottomMostWidgetOfType (handle, character)

Purpose: Searches the Widget Tree frame for the bottom-most widget of the
given Type
Notes: Typically used to determine the bottom most BUTTON or RECTANGLE Widget in a
frame for resizing when all BUTTON's are rendered in an Infragistics
toolbar/ribbon
When pcWidgetType is "BUTTON", we will also ignore rectangles that do
only contain Button widgets.

Parameters:
phParent HANDLE
The Frame handle to look in
pcWidgetType CHARACTER
The Widget type that is ignored when searching for the bottom most widget.
Returns HANDLE
The handle of the bottom most widget of the given type
Top

PUBLIC System.Drawing.Point FindBottomRightMostPointInWindow (handle)

Purpose: Determines the bottom right most used point in a Window
Notes:

Parameters:
phWindow HANDLE
The HANDLE of the Window widget
Returns System.Drawing.Point
The top left most used point in a Window
Top

PUBLIC System.Drawing.Point FindBottomRightMostPointInWindow (handle, character)

Purpose: Determines the bottom right most used point in a Window
Notes:

Parameters:
phWindow HANDLE
The HANDLE of the Window widget
pcExceptWidgetTypes CHARACTER
Comma delimited list of widget types to ignore
Returns System.Drawing.Point
The top left most used point in a Window
Top

PUBLIC System.Drawing.Point FindBottomRightMostPointInWindow (handle, character, character)

Purpose: Determines the bottom right most used point in a Window
Notes:

Parameters:
phWindow HANDLE
The HANDLE of the Window widget
pcExceptWidgetTypes CHARACTER
Comma delimited list of widget types to ignore
pcExceptWidgetNames CHARACTER
Comma delimited list of widget names to ignore
Returns System.Drawing.Point
The top left most used point in a Window
Top

PUBLIC HANDLE FindChildWidgetByName (handle, character)

Purpose: Searches for a Widget with the given name in the Parents (Frame or
Window) widget tree
Notes:

Parameters:
phParent HANDLE
The handle of the parent widget
pcWidgetName CHARACTER
The name of the child widget to return
Returns HANDLE
The handle of the child widget
Top

PUBLIC HANDLE FindChildWidgetByScreenValueAndType (handle, character, character)

Purpose: Searches for a the first Widget of the given SCREEN-VALUE in the
Parents (Frame or Window) widget tree
Notes: Useful for locating LITERAL's on the screen

Parameters:
phParent HANDLE
The handle of the parent widget
pcScreenValue CHARACTER
The screen value of the widget to return
pcWidgetType CHARACTER
The widget type of the widget to return
Returns HANDLE
The handle of the found widget
Top

PUBLIC HANDLE FindChildWidgetOfType (handle, character)

Purpose: Searches for a the first Widget of a TYPE in the given list of types
in the Parents (Frame or Window) widget tree
Notes:

Parameters:
phParent HANDLE
The handle of the PARENT
pcWidgetType CHARACTER
A comma delimited list of Widget types to search for
Returns HANDLE
The handle of the found widget
Top

PUBLIC CHARACTER FindChildWidgetsByName (handle, character)

Purpose: Searches for all Widget with the given names in the Parents (Frame or
Window) widget tree, the WidgetNames are space delimited, so that this
function is compatible with AppBuilder generated lists
Notes:

Parameters:
phParent HANDLE
The parent FRAME or WIDGET handle
pcWidgetNames CHARACTER
The space delimited list of widget names
Returns CHARACTER
The comma-delimited list of widget handles
Top

PUBLIC System.Windows.Forms.Control FindControlForWidget (Control, handle)

Purpose: Returns the reference to the .NET Controlt that is associated with
the passed in widget handle (using the Tag property of the .NET
Control)
Notes:

Parameters:
poParentControl System.Windows.Forms.Control
The reference to the parent control
phWidget HANDLE
The handle of the widget to return the Control for
Returns System.Windows.Forms.Control
The reference to the Control for the widget
Top

PUBLIC CHARACTER FindFramesWithinRectangle (handle)

Purpose: Locates all Frames that are located in the FRAME that contains the
source rectangle (could be Rectangle, Frame or COM-FRAME)
Notes: Useful for locating Frames that are used on an ABL tabfolder, i.e.
by checking if that are located within the bounds of the COM-FRAME
that parents the Active X TabFolder
Currently tests if the top left corner (absolute to the Window) is
within the Rectangle

Parameters:
phSourceRectangle HANDLE
The handle of the source rectangle
Returns CHARACTER
The comma-delimited list of the FRAME handles within the bounds
Top

PUBLIC System.Drawing.Point FindInnerMostPoint (handle)

Purpose: Returns a System.Drawing.Point with the coordinates of the
innermost used point
Notes: The actual used top and left edge of the frame contents

Parameters:
phFrame HANDLE
The handle of the FRAME
Returns System.Drawing.Point
The inner most Point
Top

PUBLIC HANDLE FindLowestWidgetOfType (handle, character, decimal)

Purpose: Locates the lowest "hangig" widget in a frame that starts at
a row above the pdeTopLimit and is of a type in the type list.
Notes:

Parameters:
phParentFrame HANDLE
The handle of the frame
pcTypeList CHARACTER
The comma delimited list of widget types
pdeTopLimit DECIMAL
The row above widgets should start
Returns HANDLE
The handle of the widget
Top

PUBLIC System.Drawing.Point FindOuterMostPoint (handle)

Purpose: Returns a System.Drawing.Point with the coordinates of the
outermost used point - the actual used bottom and right edge of the
frame contents.
Notes:

Parameters:
phFrame HANDLE
The handle of the FRAME
Returns System.Drawing.Point
The outer most Point
Top

PUBLIC CHARACTER FindRectanglesSurroundingButtonsOnly (handle)

Purpose: Returns a comma-delimited list of rectangles the do only surround
buttons
Notes: Useful in the WinKit to detect rectangles that might be hidden because
all BUTTON Widgets are renderd as Infragistics widgets

Parameters:
phFrame HANDLE
The handle of the FRAME
Returns CHARACTER
The comma-delimited list of rectangles
Top

PUBLIC System.Drawing.Point FindTopLeftMostPointInWindow (handle)

Purpose: Determines the top left most used point in a Window
Notes:

Parameters:
phWindow HANDLE
The HANDLE of the Window widget
Returns System.Drawing.Point
The top left most used point in a Window
Top

PUBLIC System.Drawing.Point FindTopLeftMostPointInWindow (handle, character)

Purpose: Determines the top left most used point in a Window
Notes:

Parameters:
phWindow HANDLE
The HANDLE of the Window widget
pcExceptWidgetTypes CHARACTER
Comma delimited list of widget types to ignore
Returns System.Drawing.Point
The top left most used point in a Window
Top

PUBLIC System.Drawing.Point FindTopLeftMostPointInWindow (handle, character, character)

Purpose: Determines the top left most used point in a Window
Notes:

Parameters:
phWindow HANDLE
The HANDLE of the Window widget
pcExceptWidgetTypes CHARACTER
Comma delimited list of widget types to ignore
pcExceptWidgetNames CHARACTER
Comma delimited list of widget names to ignore
Returns System.Drawing.Point
The top left most used point in a Window
Top

PUBLIC HANDLE FindTopMostWidgetNotOfType (handle, character)

Purpose: Searches the Widget Tree of the top most widget not of the given
type (accepts a list of types)
Notes: Typically used to determine the topmost most non BUTTON Widget in a
frame for resizing when all BUTTON's are rendered in an Infragistics
toolbar/ribbon
When pcWidgetType contains "BUTTON", we will also ignore rectangles that do
only contain Button widgets.

Parameters:
phParent HANDLE
The Frame handle to look in
pcWidgetTypes CHARACTER
The Widget type or list of widget type that is ignored when searching for the bottom most widget
Returns HANDLE
The handle of the bottom most widget
Top

PUBLIC HANDLE FindTopMostWidgetOfType (handle, character)

Purpose: Searches the Widget Tree frame for the top-most widget of the given Type
Notes: Typically used to determine the gop most BUTTON or RECTANGLE Widget in a
frame for resizing when all BUTTON's are rendered in an Infragistics
toolbar/ribbon
When pcWidgetType is "BUTTON", we will also ignore rectangles that do
only contain Button widgets.

Parameters:
phParent HANDLE
The Frame handle to look in
pcWidgetType CHARACTER
The Widget type that is ignored when searching for the bottom most widget.
Returns HANDLE
The handle of the bottom most widget of the given type
Top

PUBLIC CHARACTER FindWidgetsInRectangle (handle, character)

Purpose: Returns a comma-delimited list of all widgets of the given type
in located within the boundaries of a rectangle (in the same frame)
Notes:

Parameters:
phRectangle HANDLE
The handle of the rectangle widget
pcWidgetType CHARACTER
The type of the widgets to locate
Returns CHARACTER
The comma-delimited list of the widgets
Top

PUBLIC HANDLE FindWidgetWithName (character, character)

Purpose: Locates the Widget handle with the given name based
on a list of widget handles
Notes: Used to find a Frame handle in the cWinKitListOfFrameHandles
variable, etc.

Parameters:
pcWidgetName CHARACTER
The name of the frame to locate
pcWidgetHandles CHARACTER
The comma delimited list of frame handles
Returns HANDLE
The handle of the frame with the requested name or ?
Top

PUBLIC HANDLE FindWindow (handle)

Purpose: Searches the Widget Tree Up for the next Window
Notes:

Parameters:
phWidget HANDLE
The handle of the widget to return the window for
Returns HANDLE
The handle of the window widget
Top

PUBLIC GetMinSize (handle, integer, integer)

Purpose: Walks through all widgets in a FRAME (non-recursively) and returns
the minimum size for the FRAME in pixels
Notes: Recursion through nested FRAME's is really not a requirement here

Parameters:
phFrame HANDLE
The HANDLE of the FRAME to analyze
piMinWidth INTEGER
OUTPUT The minimum WIDTH in pixels for the FRAME
piMinHeight INTEGER
OUTPUT The minimum HEIGHT in pixels for the FRAME
Top

PUBLIC HideWidgets (handle, character)

Purpose: Hides all widgets of the given type in the frame
Notes:

Parameters:
phFrame HANDLE
The handle of the FRAME
pcWidgetType CHARACTER
The type of widgets to hide
Top

PUBLIC HideWidgets (handle, decimal, character)

Purpose: Hides all widgets of the given type in the frame
Notes:

Parameters:
phFrame HANDLE
The handle of the FRAME
pdeLimitRow DECIMAL
The top most row of the widgets to hide
pcWidgetType CHARACTER
The type of widgets to hide
Top

PUBLIC LeftAlignWidgetLabels (handle, character, character)

Purpose: Left aligns the labels of widgets in a Frame
Notes: Works on two corresponding comma-delimited lists, one with the
current columns of the widgets and the other with the target columns
of the labels

Parameters:
phFrame HANDLE
The handle of the frame containing the Widgets
pcWidgetColumns CHARACTER
A comma-delimited list of columns of widgets
pcLabelColumns CHARACTER
A comma-delimited list of columns that the widget's labels should be placed at
Top

PUBLIC System.Drawing.Image LoadImage (character)

Purpose: Loads an Image
Notes:

Parameters:
pcImageFileName CHARACTER
The file name of the image
Returns System.Drawing.Image
The reference to the Image
Top

PUBLIC INTEGER NumChildren (handle)

Purpose: Returns the number of children of the given Widget
Notes: Useful for widgets that don't have a NUM-CHILDREN property,
like a FIELD-GROUP

Parameters:
phWidget HANDLE
The handle of the parent widget
Returns INTEGER
The number of children of the given Widget, returns 0 for Widgets with no FIRST-CHILD property
Top

PUBLIC CHARACTER OrderWidgetsByColRow (character)

Purpose: Returns a list of widget handles ordered by col and then row on the
screen
Notes:

Parameters:
pcWidgetHandles CHARACTER
The original (unordered list of widget handles
Returns CHARACTER
The ordered list of widget handles
Top

PUBLIC CHARACTER OrderWidgetsByRowCol (character)

Purpose: Returns a list of widget handles ordered by row and then col on the
screen
Notes:

Parameters:
pcWidgetHandles CHARACTER
The original (unordered list of widget handles
Returns CHARACTER
The ordered list of widget handles
Top

PROTECTED PopulateWidgetTempTable (character)

Purpose: Populates (fills the
Notes:

Parameters:
pcWidgetHandles CHARACTER
The original (unordered list of widget handles
Top

PUBLIC RefreshButtons (Control)

Purpose: Refreshes Buttons based on the ABL widget status (UltraButton / BUTTON)
Notes:

Parameters:
poParentControl System.Windows.Forms.Control
The control container that conatins the buttons overlaying the ABL BUTTON widgets
Top

PUBLIC System.Windows.Forms.Control ReplaceWidget (handle, Control, Type, integer, integer)

Purpose: Overlays one widget with a .NET Controls of the
given type (i.e. BUTTON Widget -> UltraButton Control).
Notes:

Parameters:
phWidget HANDLE
The handle of the widget to replace
poParentControl System.Windows.Forms.Control
The target control container
poControlType System.Type
The System.Type to overlay the widgets with
piRowOffset INTEGER
The row offset used by the parent Form (see EmbeddedWindowForm)
piColOffset INTEGER
The column offset used by the parent Form (see EmbeddedWindowForm)
Returns System.Windows.Forms.Control
The reference to the generated Control
Top

PUBLIC System.Windows.Forms.Control ReplaceWidget (handle, Control, Type, integer, integer, logical)

Purpose: Overlays one widget with a .NET Controls of the
given type (i.e. BUTTON Widget -> UltraButton Control).
Notes:

Parameters:
phWidget HANDLE
The handle of the widget to replace
poParentControl System.Windows.Forms.Control
The target control container
poControlType System.Type
The System.Type to overlay the widgets with
piRowOffset INTEGER
The row offset used by the parent Form (see EmbeddedWindowForm)
piColOffset INTEGER
The column offset used by the parent Form (see EmbeddedWindowForm)
plPostMessage LOGICAL
When True then the original button will receive a BM_CLICK Message using the PostMessage API, otherwise APPLY CHOOSE is used
Returns System.Windows.Forms.Control
The reference to the generated Control
Top

PUBLIC ReplaceWidgets (handle, Control, character, Type, integer, integer)

Purpose: Overlays widgets of the given type with .NET Controls of the
given type (i.e. BUTTON Widget -> UltraButton Control).
Notes:

Parameters:
phParentFieldGroup HANDLE
The parent fieldgroup to locate widgets
poParentControl System.Windows.Forms.Control
The target control container
pcWidgetType CHARACTER
The type of widgets to replace
poControlType System.Type
The System.Type to overlay the widgets with
piRowOffset INTEGER
The row offset used by the parent Form (see EmbeddedWindowForm)
piColOffset INTEGER
The column offset used by the parent Form (see EmbeddedWindowForm)
Top

PUBLIC ReplaceWidgets (handle, Control, character, Type, integer, integer, logical)

Purpose: Overlays widgets of the given type with .NET Controls of the
given type (i.e. BUTTON Widget -> UltraButton Control).
Notes:

Parameters:
phParentFieldGroup HANDLE
The parent fieldgroup to locate widgets
poParentControl System.Windows.Forms.Control
The target control container
pcWidgetType CHARACTER
The type of widgets to replace
poControlType System.Type
The System.Type to overlay the widgets with
piRowOffset INTEGER
The row offset used by the parent Form (see EmbeddedWindowForm)
piColOffset INTEGER
The column offset used by the parent Form (see EmbeddedWindowForm)
plPostMessage LOGICAL
When True then the original button will receive a BM_CLICK Message using the PostMessage API, otherwise APPLY CHOOSE is used
Top

PUBLIC SetBackgroundColor (handle, integer)

Purpose: Assigns a Background color to a Widget - only when the color is
different from the current background color
Notes: This is useful to prevent flickering that occurs when frequently
setting a background color to a widget that was already set

Parameters:
phWidget HANDLE
The handle of the widget
piColor INTEGER
The background color to be set
Top

PUBLIC SetFrameBackgroundColor (handle, integer)

Purpose: Changes the background color of the frame and all contained frames
Notes: Can also be invoked for the window

Parameters:
phParent HANDLE
The parent FRAME or WINDOW
piColor INTEGER
The color number to be used for FRAME and WINDOW widgets BGCOLOR
Top

PUBLIC SetFrameBackgroundColor (handle, integer, integer, integer)

Purpose: Changes the background color of the frame and all contained frames
and optionally the browse widgets
Notes: Can also be invoked for the window, with the piBrowseColor = ? then
the browse widgets won't be changed

Parameters:
phParent HANDLE
The parent FRAME or WINDOW
piColor INTEGER
The color number to be used for FRAME and WINDOW widgets BGCOLOR
piBrowseColor INTEGER
The color number to be used for BROWSE widgets BGCOLOR
piTextboxColor INTEGER
The color number to be used for FILL-IN, EDITOR, COMBO-BOX widgets BGCOLOR
Top

PUBLIC SetFrameBackgroundColor (handle, integer, integer, integer, integer)

Purpose: Changes the background color of the frame and all contained frames
and optionally the browse widgets
Notes: Can also be invoked for the window, with the piBrowseColor = ? then
the browse widgets won't be changed

Parameters:
phParent HANDLE
The parent FRAME or WINDOW
piColor INTEGER
The color number to be used for FRAME and WINDOW widgets BGCOLOR
piBrowseColor INTEGER
The color number to be used for BROWSE widgets BGCOLOR
piTextboxColor INTEGER
The color number to be used for FILL-IN, EDITOR, COMBO-BOX widgets BGCOLOR
piDisabledtextColor INTEGER
The color number to be used for FILL-IN, EDITOR, COMBO-BOX widgets BGCOLOR when disabled
Top

PUBLIC SetFrameBackgroundColor (handle, integer, integer, integer, integer, integer)

Purpose: Changes the background color of the frame and all contained frames
and optionally the browse widgets
Notes: Can also be invoked for the window, with the piBrowseColor = ? then
the browse widgets won't be changed

Parameters:
phParent HANDLE
The parent FRAME or WINDOW
piColor INTEGER
The color number to be used for FRAME and WINDOW widgets BGCOLOR
piBrowseColor INTEGER
The color number to be used for BROWSE widgets BGCOLOR
piTextboxColor INTEGER
The color number to be used for FILL-IN, EDITOR, COMBO-BOX widgets BGCOLOR
piDisabledtextColor INTEGER
The color number to be used for FILL-IN, EDITOR, COMBO-BOX widgets BGCOLOR when disabled
piBrowseColumnColor INTEGER
The color number to be used for BROWSE widgets LABEL-BGCOLOR
Top

PUBLIC SetFrameBackgroundColor (handle, integer, integer, integer, integer, integer, integer, integer)

Purpose: Changes the background color of the frame and all contained frames
and optionally the browse widgets
Notes: Can also be invoked for the window, with the piBrowseColor = ? then
the browse widgets won't be changed

Parameters:
phParent HANDLE
The parent FRAME or WINDOW
piColor INTEGER
The color number to be used for FRAME and WINDOW widgets BGCOLOR
piBrowseColor INTEGER
The color number to be used for BROWSE widgets BGCOLOR
piTextboxColor INTEGER
The color number to be used for FILL-IN, EDITOR, COMBO-BOX widgets BGCOLOR
piDisabledtextColor INTEGER
The color number to be used for FILL-IN, EDITOR, COMBO-BOX widgets BGCOLOR when disabled
piBrowseColumnColor INTEGER
The color number to be used for BROWSE widgets LABEL-BGCOLOR
piToggleBoxColor INTEGER
The color number to be used for TOGGLE-BOX widgets BGCOLOR
piRadiosetColor INTEGER
The color number to be used for RADIO-SET widgets BGCOLOR
Top

PUBLIC SetFrameBackgroundColor (handle, integer, integer, integer, integer, integer, integer, integer, logical)

Purpose: Changes the background color of the frame and all contained frames
and optionally the browse widgets
Notes: Can also be invoked for the window, with the piBrowseColor = ? then
the browse widgets won't be changed

Parameters:
phParent HANDLE
The parent FRAME or WINDOW
piColor INTEGER
The color number to be used for FRAME and WINDOW widgets BGCOLOR
piBrowseColor INTEGER
The color number to be used for BROWSE widgets BGCOLOR
piTextboxColor INTEGER
The color number to be used for FILL-IN, EDITOR, COMBO-BOX widgets BGCOLOR
piDisabledtextColor INTEGER
The color number to be used for FILL-IN, EDITOR, COMBO-BOX widgets BGCOLOR when disabled
piBrowseColumnColor INTEGER
The color number to be used for BROWSE widgets LABEL-BGCOLOR
piToggleBoxColor INTEGER
The color number to be used for TOGGLE-BOX widgets BGCOLOR
piRadiosetColor INTEGER
The color number to be used for RADIO-SET widgets BGCOLOR
plColorLiterals LOGICAL
When True LITERAL or TEXT widgets BGCOLOR will be set to piColor as well
Top

PUBLIC SetFrameBackgroundColor (ISetFrameBackgroundColorParameter)

Purpose: Changes the background color of the frame and all contained frames
and optionally the browse widgets
Notes: Can also be invoked for the window, with the piBrowseColor = ? then
the browse widgets won't be changed

Parameters:
poParameter Consultingwerk.Util.ISetFrameBackgroundColorParameter
The ISetFrameBackgroundColorParameter with the parameter values for this method
Top

PRIVATE SetFrameBackgroundColorInternal (ISetFrameBackgroundColorParameter)

Purpose: Changes the background color of the frame and all contained frames
and optionally the browse widgets
Notes: Can also be invoked for the window, with the piBrowseColor = ? then
the browse widgets won't be changed

Parameters:
poParameter Consultingwerk.Util.ISetFrameBackgroundColorParameter
The ISetFrameBackgroundColorParameter with the parameter values for this method
Top

PUBLIC ShowWidgetProperties (handle)

Purpose: Shows a MESSAGE with properties of the widget
Notes:

Parameters:
phWidget HANDLE
The handle of the widget
Top

PUBLIC ShowWidgetProperties (handle, character)

Purpose: Shows a MESSAGE with properties of the widget
Notes:

Parameters:
phWidget HANDLE
The handle of the widget
pcTitle CHARACTER
The title of the message
Top

PUBLIC CHARACTER SideLabelHandlesInFrame (handle)

Purpose: Returns a comma delimited list of all the side-label-handles in a FRAME
Notes:

Parameters:
phFrame HANDLE
The handle of the FRAME to return the side label handles for
Returns CHARACTER
A comma delimited list of all side-label handles in the FRAME
Top

PUBLIC LOGICAL WidgetContainedIn (handle, handle)

Purpose: Determines if the inner widget is contained within the outer widget
Notes:

Parameters:
phOuter HANDLE
The handle of the outer widget
phInner HANDLE
The handle of the inner widget
Returns LOGICAL
Logical value indicating if the inner widget is located in the outer widget
Top

PUBLIC CHARACTER WidgetLabel (handle)

Purpose: Returns a Label of a Widget, the Name - or <invalid> when the Widget
is not valid
Notes: Useful for debug messages

Parameters:
phWidget HANDLE
The handle of the Widget
Returns CHARACTER
The name of the Widget, the Lable or "<invalid>" when the Widget is not valid
Top

PUBLIC CHARACTER WidgetName (handle)

Purpose: Returns the Name of a Widget - or <invalid> when the Widget is not
valid
Notes: Useful for debug messages

Parameters:
phWidget HANDLE
The handle of the Widget
Returns CHARACTER
The name of the Widget or "<invalid>" when the Widget is not valid
Top

PUBLIC CHARACTER WidgetNames (character)

Purpose: Returns the Names of a list of Widgets - or <invalid> when an entry
is not valid
Notes: Useful for debug messages

Parameters:
pcWidgets CHARACTER
The comma delimited list of handles of the Widgets
Returns CHARACTER
The names of the Widgets or "<invalid>" when an entry is not valid


Constructor Detail
Top

PROTECTED WidgetHelper ()

Purpose: Protected default constructor.
Notes: There's no need to create instances of the helper classes

Top

STATIC WidgetHelper ()

Purpose: Initializes the static instance of the WidgetHelper
Notes:



©2006-2019 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.08.2019 23:58:00