Class: cSigCJPropertyGridComboFormItem
---------------------------------------------------
Class : cSigCJPropertyGridComboFormItem
Superclass : cSigCJPropertyGridItem
Package : cSigCJPropertyGrid.pkg
Mixins : cSigCJPropertyGridItemButton_Mixin
Description : Property Grid Item with Drop Down ComboForm
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)
psButtonCaption (String)
pbButtonEnabled (Boolean)
psButtonImage (String)
piButtonWidth (Integer)
psButtonTooltip (String)
Events : OnClick
OnChange
OnEditAfter
OnMoveItemDataIn
OnMoveItemDataOut
OnAddLookupItems
Methods : Procedure Set PropertyItemMask (String llMask String llLiteral Variant llPrompt)
Procedure Set LookupItemImage (Integer iItemIndex String sImage)
Procedure Set LookupItemData (Integer iItemIndex Integer iItemData)
Procedure AddLookupItem (String sDescription Integer iItemData String sImage Variant vCode)
Function CodeFromDescription (String sDescription Boolean ByRef bFound Returns Variant)
Function ItemDataFromDescription (String sDescription Boolean ByRef bFound Returns Integer)
Function DescriptionFromCode (Variant vCode Boolean ByRef bFound Returns String)
Procedure ComboDeleteItems
Notes :
To Do :
---------------------------------------------------
Class Hierarchy:
DFCOMAUTOMATIONOBJECT

cComAutomationObject


cSigCjComPropertyGridItem



cSigCJPropertyGridItem




cSigCJPropertyGridComboFormItemMixins:
cSigCJPropertyGridItemButton_Mixin,
Class Definition
Properties
tdGridItemSelectionValue[]
ptaGridItemSelectionValue
Functions and Procedures

AddLookupItem(String sDescription Integer iItemData String sImage Variant vCode)
---------------------------------------------------
Procedure : AddLookupItem
Scope : Public
Paramaters : sCaption, iData, sImage, vCode
Returns : None
Purpose : 'Registers' an item for inclusion in list of item constraints (lookup values)
Notes : vCode is added because it could be that the developer wants to display a descriptive value
whilst mapping to a code value in the background (the code being the value that ultimately
will be saved to the database)
---------------------------------------------------

BindToDataBase(Integer hFile Integer iField)
---------------------------------------------------
Function : BindToDataBase
Scope : Public
Paramaters : Integer hFile Integer iField
Returns : None
Purpose : Forward Send, but then because this is a combo item, see if there is a validation table for this field
If so, set the lookup items with the values from the validation table
Notes : Set pbCapslock_State to False if there is a codevalidation table. It may be a capslock field, but this will
be for the code, not the description (that we will be displaying)
---------------------------------------------------
Variant
CodeFromDescription(String sDescription Boolean ByRef bFound)
---------------------------------------------------
Function : CodeFromDescription
Scope : Public
Paramaters : sDescription, bFound (byref)
Returns : Variant (vCode)
Purpose : If you have the current value of an property item and you know this is one of a list of constraints
you can call this function to return the 'Code' value that is associated with this 'Description' value
Notes : bFound is passed by reference and tells the developer if the value that they were looking for was found or not.
You can't rely on a return value of 0 (or blank) as an indication of whether it was found because these may be valid values
---------------------------------------------------

ComboDeleteItems()
---------------------------------------------------
Procedure : ComboDeleteItems
Scope : Public Method
Paramaters : None
Returns : None
Purpose : Can be used to clear all of a comboforms data items
Notes :
---------------------------------------------------
Integer
ConstraintCodeComparison(tdGridItemSelectionValue tCode1 tdGridItemSelectionValue tCode2)
---------------------------------------------------
Function : ConstraintCodeComparison
Scope : Private
Paramaters : tdGridItemSelectionValue x2 (for comparison)
Returns : Integer
Purpose : To compare the Code elements of 2 structs.
Notes : Used internally from DescriptionFromCode
---------------------------------------------------
Integer
ConstraintDescriptionComparison(tdGridItemSelectionValue tDesc1 tdGridItemSelectionValue tDesc2)
---------------------------------------------------
Function : ConstraintDescriptionComparison
Scope : Private
Paramaters : tdGridItemSelectionValue x2 (for comparison)
Returns : Integer
Purpose : To compare the Description elements of 2 structs.
Notes : Used internally from CodeFromDescription and ItemDataFromDescription
---------------------------------------------------

Construct_Object()
String
DescriptionFromCode(Variant vCode Boolean ByRef bFound)
---------------------------------------------------
Function : DescriptionFromCode
Scope : Public
Paramaters : vCode, bFound (byref)
Returns : sDescription
Purpose : If a property grid item has a combo form with descriptions and associated code values then you can call this
function to determine the description value for a specified code. This is most useful when populating the grid
from a database where the raw data is a code value but you wish to show a descriptive value in the control (think dbcomforms)
Notes : bFound is passed by reference and tells the developer if the value that they were looking for was found or not.
You can't rely on a return value of 0 (or blank) as an indication of whether it was found because these may be valid values
---------------------------------------------------

DoAddLookupItems()
---------------------------------------------------
Procedure : DoAddLookupItems
Scope : Private
Paramaters : None
Returns : None
Purpose : Called from Private.Create. Adds any lookup items to the list of constraints
Notes : Called internally. Developer does not need to concern themself with this
---------------------------------------------------

End_Construct_Object()
Integer
ItemDataFromDescription(String sDescription Boolean ByRef bFound)
---------------------------------------------------
Function : ItemDataFromDescription
Scope : Public
Paramaters : sDescription, bFound (byref)
Returns : Integer (iItemData)
Purpose : If you have the current value of an property item and you know this is one of a list of constraints
you can call this function to return the iItemData value that is associated with this 'Description' value
Notes : bFound is passed by reference and tells the developer if the value that they were looking for was found or not.
You can't rely on a return value of 0 (or blank) as an indication of whether it was found because these may be valid values
---------------------------------------------------

MoveItemDataToDatabase()

OnAddLookupItems()
---------------------------------------------------
Procedure : OnAddLookupItems
Scope : Public Event
Paramaters : None
Returns : None
Purpose : Intended that you would call "Send AddLookupItem" from this event to populate the combo
Notes : If the item is bound to a data field that has a Field_Table_Object the combo will automatically
be populated. If you want to add images you should forward Send OnAddLookupItems and then add the images
---------------------------------------------------

Private.Create(Handle hoParent Boolean bRecursive)

ReadItemFromDatabase()
---------------------------------------------------
Function : ReadItemFromDatabase
Scope : Public
Paramaters : None
Returns : None
Purpose : Forward Send, but then because this is a combo item, see if we have a description that matches our value
If so, display this instead
---------------------------------------------------

Set(Integer iItemIndex String sImage)
---------------------------------------------------
Procedure : Set LookupItemImage
Scope : Public
Paramaters : Integer iItemIndex String sImage
Returns : None
Purpose : Sets icon index for specified lookup item.
Notes : MUST be called AFTER AddLookupItem
---------------------------------------------------

Set(Integer iItemIndex Integer iItemData)
---------------------------------------------------
Procedure : Set LookupItemData
Scope : Public
Paramaters : Integer iItemIndex Integer iItemData
Returns : None
Purpose : Sets item data for specified lookup item.
Notes : MUST be called AFTER AddLookupItem
---------------------------------------------------
Instances
oCtgry_CaptionBar | oCalendar_Properties.pkg | 67 |
oItem_Address1 | oPropertyGrid_Container.pkg | 45 |
oItem_Address2 | oPropertyGrid_Container.pkg | 49 |
oItem_Address3 | oPropertyGrid_Container.pkg | 53 |
oItem_Address4 | oPropertyGrid_Container.pkg | 57 |
oItem_Admin_Password | oPropertyGrid_Container.pkg | 137 |
oItem_Allow_Amend_Date | oPropertyGrid_Container.pkg | 94 |
oItem_Categories | oCalendar_Properties.pkg | 156 |
oItem_ClickToAdd | oCalendar_Properties.pkg | 276 |
oItem_ClickToAddText | oCalendar_Properties.pkg | 290 |
oItem_Compress | oCalendar_Properties.pkg | 438 |
oItem_Customer_No | oPropertyGrid_Container.pkg | 219 |
oItem_Default_Price | oPropertyGrid_Container.pkg | 133 |
oItem_Dialogs | oCalendar_Properties.pkg | 142 |
oItem_Height | oPropertyGrid_Container.pkg | 200 |
oItem_IP_Create | oCalendar_Properties.pkg | 339 |
oItem_IPE | oCalendar_Properties.pkg | 353 |
oItem_IPE_F2 | oCalendar_Properties.pkg | 371 |
oItem_IPE_Mouse | oCalendar_Properties.pkg | 385 |
oItem_IPE_Resize | oCalendar_Properties.pkg | 357 |
oItem_IPE_Tab | oCalendar_Properties.pkg | 399 |
oItem_LastDayEnd | oCalendar_Properties.pkg | 557 |
oItem_LunchEnd | oCalendar_Properties.pkg | 599 |
oItem_LunchStart | oCalendar_Properties.pkg | 585 |
oItem_Minutes | oCalendar_Properties.pkg | 325 |
oItem_Name | oPropertyGrid_Container.pkg | 38 |
oItem_Order_No | oPropertyGrid_Container.pkg | 224 |
oItem_OutlookGlyphs | oCalendar_Properties.pkg | 452 |
oItem_Postcode | oPropertyGrid_Container.pkg | 61 |
oItem_Reminders | oCalendar_Properties.pkg | 131 |
oItem_ShadeLunch | oCalendar_Properties.pkg | 571 |
oItem_ShortLastDay | oCalendar_Properties.pkg | 543 |
oItem_Show_Date | oCalendar_Properties.pkg | 82 |
oItem_Show_Date_Nav | oCalendar_Properties.pkg | 93 |
oItem_Show_View_Nav | oCalendar_Properties.pkg | 104 |
oItem_ShowBar | oCalendar_Properties.pkg | 71 |
oItem_Size | oPropertyGrid_Container.pkg | 142 |
oItem_SystemDate | oPropertyGrid_Container.pkg | 90 |
oItem_Telephone | oPropertyGrid_Container.pkg | 82 |
oItem_Title | oCalendar_Properties.pkg | 624 |
oItem_ToolTips | oCalendar_Properties.pkg | 262 |
oItem_Use_Icons | oCalendar_Properties.pkg | 19 |
oItem_Use_Icons | oCalendar_Properties.pkg | 33 |
oItem_Use_Icons | oCalendar_Properties.pkg | 47 |
oItem_Width | oPropertyGrid_Container.pkg | 209 |
oItem_WorkDayEnd | oCalendar_Properties.pkg | 529 |
oItem_WorkDayStart | oCalendar_Properties.pkg | 515 |
oScaleTime_DayEnd | oCalendar_Properties.pkg | 206 |
oScaleTime_DayStart | oCalendar_Properties.pkg | 192 |
oScaleTime_Use | oCalendar_Properties.pkg | 220 |
References (7):