Class: cSigCJPropertyGridItem
---------------------------------------------------
Class : cSigCJPropertyGridItem
Superclass : cSigCjComPropertyGridItem
Package : cSigCJPropertyGrid.pkg
Mixins : cSigCJPropertyGridItem_Mixin
Description : Represents an item in the Property Grid.
Properties : psLabel (String)
psHelpText (String)
psToolTip (String)
pbCreateExpanded (Boolean)
pbLabelEmboldened (Boolean)
peItemType (Integer)
pvValue (Variant)
pbDefaultAsInitialValue (Boolean)
pvDefaultValue (Variant)
pvInitialValue (Variant)
pvTag (Variant)
pbHidden (Boolean)
pbReadOnly (Boolean)
pbPassword_State (Boolean)
pbCapslock_State (Boolean)
piForm_Margin (Integer)
piValueBackgroundColor (Integer)
psImage (String)
psFormat (String)
READ-ONLY ***
Item_Server (Handle)
Item_Data_Field (Integer)
Events : OnChange
OnEditAfter
OnMoveItemDataIn
OnMoveItemDataOut
Methods : Procedure Set PropertyItemMask (String llMask String llLiteral Variant llPrompt)
Procedure BindToDatabase (integer hFile integer iField)
MoveItemDataToDatabase
ReadItemFromDatabase
Notes : Example call of BindToDatabase: Send BindToDatabase File_Field Sysfile.Field_1
To Do :
---------------------------------------------------
Class Hierarchy:
DFCOMAUTOMATIONOBJECT

cComAutomationObject


cSigCjComPropertyGridItem



cSigCJPropertyGridItemMixins:
cSigCJMethods_Mixin, cSigCJPropertyGridItem_Mixin,
Direct Known Subclasses:
cSigCJPropertyGridComboFormItem, cSigCJPropertyGridExpandBtnItem, cSigCJPropertyGridSliderCtlItem, cSigCJPropertyGridSpinFormItem, cSigCJPropertyGridSubCategory, Class Definition
Properties
Boolean
pbDefaultAsInitialValue
Boolean
Private.pbCapslock
Boolean
Private.pbHidden
Boolean
Private.pbIsPassword
Boolean
Private.pbReadOnly
Integer
Private.peItemType
Handle
Private.phoPropertyGridItemServer
If this item is linked to a field in a database, we may like properties
to store the server and field values
Integer
Private.piFormMargin
Integer
Private.piPropertyGridItemDataField
Integer
Private.piValueBackgroundColor
String
Private.psFormat
Variant
Private.pvDefaultValue
Variant
Private.pvTag
Variant
Private.pvValue
tdPropertyItemMask
ptPropertyItemMask
Functions and Procedures

BindToDataBase(Integer hFile Integer iField)
---------------------------------------------------
Procedure : BindToDataBase
Scope : Public
Paramaters : iFile iField
Returns : None
Purpose : Links a grid item with the db (file and field). Sets Private.phoPropertyGridItemServer
and Private.piPropertyGridItemDataField
Notes : If an item is linked to the db, pbCapslock_State and piForm_Margin will be set automatically. If you don't
Set psLabel or psHelpText these too will be taken from the DD
Example Call: Send BindToDataBase File_Field Sysfile.Company_Name
---------------------------------------------------

Construct_Object()

DoApplyMask()
---------------------------------------------------
Procedure : DoApplyMask
Scope : Private
Paramaters : None
Returns : None
Purpose : Called from Private.Create. Applies any mask set using 'Set PropertyItemMask'
Notes : Called internally. Developer does not need to concern themself with this
---------------------------------------------------

End_Construct_Object()
Integer
Item_Data_Field()
Handle
Item_Server()
Create and augment procedures and functions

MoveItemDataToDatabase()
---------------------------------------------------
Procedure : MoveItemDataToDatabase
Scope : Public
Paramaters : None
Returns : None
Purpose : If item is bound to the database (file and field) it will simply set the field_changed_value of the item's
server DDO with the value of the property grid item.
Notes : Could be Broadcast as part of a save process.
Take care however. If the item has a combo form it MAY be that you DON'T want to save the value (decription)
but instead would want to save the itemdata or code value!
If this is the case, the method can be augmented in the item object to "Get CodeFromDescription" of whatever
---------------------------------------------------

OnChange()
OnChange
Called whenever an item's value is changed and user exists the item

OnEditAfter(String ByRef llNewValue Boolean ByRef llCancel)
OnEditAfter
Called whenever an item's value has been editted. Setting llCancel to True will stop the edit

OnMoveItemDataIn()
OnMoveItemDataIn
Called from DoMoveDataIn (of the property grid). This is called from OnCreate and can be used to set item data (appy from database,say)

OnMoveItemDataOut()
OnMoveItemDataOut
Called from DoMoveDataOut (of the property grid). This can be used to save item data to the database, say
Boolean
pbCapslock_State()
Boolean
pbHidden()
Boolean
pbPassword_State()
Boolean
pbReadOnly()
String
peItemType()
Integer
piForm_Margin()
Integer
piValueBackgroundColor()

Private.Create(Handle hoParent Boolean bRecursive)
String
psFormat()
String
pvDefaultValue()
String
pvTag()
String
pvValue()

ReadItemFromDatabase()
---------------------------------------------------
Procedure : ReadItemFromDatabase
Scope : Public
Paramaters : None
Returns : None
Purpose : If item is bound to the database (file and field) it will simply get the field_current_value of the item's
server DDO and set the value of the property grid item.
Notes : Could be Broadcast as part of an initialise process
Take care however. If the item has a combo form it MAY be that you DON'T want to set the value with the raw
data but instead with a descriptive value. If this is the case, use Get DescriptionFromCode of the comboitem
and set the value with this instead.
---------------------------------------------------

Set(Integer eType)

Set(Variant vValue)

Set(Variant vValue)

Set(Variant vValue)
---------------------------------------------------
Procedure : Set pvInitialValue
Scope : Public
Paramaters : Variant (vVal)
Returns : None
Purpose : Can be used to set both the value AND the default value (to be the same) at the same time
Notes : If setting a value from event OnMoveItemDataIn then this is a useful way of setting both the value AND the default
Otherwise, because the initial value is set during Private.OnCreate, any value applied afterwards will be seen to be
different (the default will be the intial value - undefined)
---------------------------------------------------

Set(Variant vValue)

Set(Boolean bHidden)

Set(Boolean bReadOnly)

Set(Boolean bState)

Set(Boolean bState)

Set(Integer iWidth)

Set(Integer iColor)

Set(String sFormat)

Set(String llMask String llLiteral Variant llPrompt)
---------------------------------------------------
Procedure : Set PropertyItemMask
Scope : Public
Paramaters : llMask, llLiteral, llPrompt
Returns : None
Purpose : Sets the mask of a property grid item
Notes : You can use any of these characters for defining your edit mask:
0 - Numeric (0-9)
9 - Numeric (0-9) or space (' ')
# - Numeric (0-9) or space (' ') or ('+') or ('-')
L - Alpha (a-Z)
? - Alpha (a-Z) or space (' ')
a - Alpha numeric (0-9 and a-Z)
a - Alpha numeric (0-9 and a-Z) or space (' ')
& - All Print character only
H - Hex digit (0-9 and a-F)
X - Hex digit (0-9 and a-F) and space (' ')
> - Forces characters to upper Case (a-Z)
< - Forces characters to lower Case (a-z)
llLiteral defines the prompt area of the mask where text entry is allowed. This should match the areas that
you have already defined as mask fields. By default the prompt character is '_' .
llPrompt is optional, but allows you to define default characters that you want displayed when the user presses
the backspace key. This usually represents data that has been previously saved then restored. This makes it easy
for the user to restore some or all of the default text displayed when the control was initialized.
---------------------------------------------------
References (55):