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

File:ClassHelper
Purpose:Class contains generic supporting routines to work
with classes
Syntax:Static methods only, private constructor to disallow
instance creation
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Mon Jul 12 20:31:09 CEST 2010
Notes:This file is intended for GUI for .NET only
The result temp-table description is in Consultingwerk/Util/TempTables/ttClassNames.i



Top Method Summary
Options Name Purpose
+ LOGICAL ExistsByName (character, IEnumerable) Returns if the given list contains an object with the given name
+ LOGICAL ExistsByName (IEnumerable, character) Returns if the given list contains an object with the given name
+ LOGICAL ExistsByTag (character, IEnumerable) Returns if the given list contains an object with the given Tag
+ LOGICAL ExistsByTag (IEnumerable, character) Returns if the given list contains an object with the given Tag
+ System.Collections.Generic.List <System.Windows.Forms.Control> FindAllControlsOfType (Control, Type) Returns a List of all Controls in the Form that are of the given type
# FindAllControlsOfType (Control, Control>, Type) Returns a List of all Controls in the Form that are of the given type
+ System.Object FindByTag (character, IEnumerable) Returns the first object from the list with the given Tag
+ System.Object FindByTag (IEnumerable, character) Returns the first object from the list with the given Tag
+ System.Object FindByTag (Object, Control+ControlCollection) Returns the first object from the list with the given Tag
+ System.Windows.Forms.Control FindParentControlOfType (Control, Type) Walks up the Parent-Chain of a .NET Control and returns the first ParentControl that is compatible with the given type
+ System.Windows.Forms.UserControl FindParentUserControl (Control) Walks up the Parent-Chain of a .NET Control and returns the first UserControl
+ System.Windows.Forms.Control GetControlByChildIndex (Control+ControlCollection, integer) Returns the Control with the given ChildIndex in the ControlsCollection

Top Constructor Summary
Options Name Purpose
# ControlHelper () Constructor for the ControlHelper class


Method Detail
Top

PUBLIC LOGICAL ExistsByName (character, IEnumerable)

Purpose: Returns if the given list contains an object with the given name
Notes: Some Telerik lists do not provide an Exists method. This method here
may be used to test if a list contains an object with the provided
Name

Parameters:
pcName CHARACTER
The name to test for
poCollection System.Collections.IEnumerable
The list to test in
Returns LOGICAL
Logical property indicating if the list contains an object with the given name
Top

PUBLIC LOGICAL ExistsByName (IEnumerable, character)

Purpose: Returns if the given list contains an object with the given name
Notes: Some Telerik lists do not provide an Exists method. This method here
may be used to test if a list contains an object with the provided
Name

Parameters:
poCollection System.Collections.IEnumerable
The list to test in
pcName CHARACTER
The name to test for
Returns LOGICAL
Logical property indicating if the list contains an object with the given name
Top

PUBLIC LOGICAL ExistsByTag (character, IEnumerable)

Purpose: Returns if the given list contains an object with the given Tag
Notes: Some Telerik lists do not provide an Exists method. This method here
may be used to test if a list contains an object with the provided
Name

Parameters:
pcTag CHARACTER
The Tag value to test for
poCollection System.Collections.IEnumerable
The list to test in
Returns LOGICAL
Logical property indicating if the list contains an object with the given Tag
Top

PUBLIC LOGICAL ExistsByTag (IEnumerable, character)

Purpose: Returns if the given list contains an object with the given Tag
Notes: Some Telerik lists do not provide an Exists method. This method here
may be used to test if a list contains an object with the provided
Name

Parameters:
poCollection System.Collections.IEnumerable
The list to test in
pcTag CHARACTER
The Tag value to test for
Returns LOGICAL
Logical property indicating if the list contains an object with the given Tag
Top

PUBLIC System.Collections.Generic.List <System.Windows.Forms.Control> FindAllControlsOfType (Control, Type)

Purpose: Returns a List of all Controls in the Form that are of the given type
Notes:

Parameters:
poContainerControl System.Windows.Forms.Control
The reference to the parent control
poType System.Type
The reference to the System.Type
Returns System.Collections.Generic.List <System.Windows.Forms.Control>
The List of all Controls of the given type
Top

PROTECTED FindAllControlsOfType (Control, Control>, Type)

Purpose: Returns a List of all Controls in the Form that are of the given type
Notes:

Parameters:
poParentControl System.Windows.Forms.Control
The current parent Control reference
poList System.Collections.Generic.List
The List of Control to add the matching Controls to
poType System.Type
The reference to the System.Type
Top

PUBLIC System.Object FindByTag (character, IEnumerable)

Purpose: Returns the first object from the list with the given Tag
Notes: Returns ? when the Tag cannot be found

Parameters:
pcTag CHARACTER
The Tag value to search for
poCollection System.Collections.IEnumerable
The list to search in
Returns System.Object
The reference to the object with the given Tag
Top

PUBLIC System.Object FindByTag (IEnumerable, character)

Purpose: Returns the first object from the list with the given Tag
Notes: Returns ? when the Tag cannot be found

Parameters:
poCollection System.Collections.IEnumerable
The list to search in
pcTag CHARACTER
The Tag value to search for
Returns System.Object
The reference to the object with the given Tag
Top

PUBLIC System.Object FindByTag (Object, Control+ControlCollection)

Purpose: Returns the first object from the list with the given Tag
Notes: Returns ? when the Tag cannot be found

Parameters:
poTag System.Object
The Tag value as a System.Object reference
poCollection System.Windows.Forms.Control+ControlCollection
The control collection to search in
Returns System.Object
The reference to the object with the given Tag
Top

PUBLIC System.Windows.Forms.Control FindParentControlOfType (Control, Type)

Purpose: Walks up the Parent-Chain of a .NET Control and returns the first
ParentControl that is compatible with the given type
Notes: When no user control is found this method returns ?
When used on a Control of the given type, the method will still be
seeking for a compatible Control in the Parent-Chain.

Parameters:
poControl System.Windows.Forms.Control
The Control to search the next parent Control of matching type for
poType System.Type
The System.Type of the Control to search
Returns System.Windows.Forms.Control
The reference to the parent Control
Top

PUBLIC System.Windows.Forms.UserControl FindParentUserControl (Control)

Purpose: Walks up the Parent-Chain of a .NET Control and returns the first
UserControl
Notes: When no user control is found this method returns ?
When used on a UserControl, the method will still be seeking for a
UserControl in the Parent-Chain.

Parameters:
poControl System.Windows.Forms.Control
The Control to search the next parent UserControl for
Returns System.Windows.Forms.UserControl
The reference to the parent UserControl
Top

PUBLIC System.Windows.Forms.Control GetControlByChildIndex (Control+ControlCollection, integer)

Purpose: Returns the Control with the given ChildIndex in the ControlsCollection
Notes:

Parameters:
poControlCollection System.Windows.Forms.Control+ControlCollection
The ControlsCollection to locate the ChildIndex in
piIndex INTEGER
The Child Index to locate the Control at
Returns System.Windows.Forms.Control
The located Control or ? when no Control was found


Constructor Detail
Top

PROTECTED ControlHelper ()

Purpose: Constructor for the ControlHelper class
Notes: Protected default constructor



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