====== ADD method (PropertyGrid) ====== ==== Description ==== Adds a new property item to the Property Grid. ==== Syntax ==== AddedOK = Exec_Method( CtrlEntID, "ADD", Category, Name, Type, Value, Options, Description, Disabled, Itemstyle, Iconv, ErrorText, DefaultValue, OptionValues ) ==== Parameters ==== (These parameters are more fully described in "Property Items" section above) ^Name^Required^Description^ |Category |Yes |Category that the item belongs to. Items are grouped by this. | |Name |Yes |Name of the property item. This name must be unique across all items in the control.| |Type |Yes |Type of property item: PGIT_STATIC$, PGIT_EDIT$ etc. | |Value |No |Value of the property item. | |Options |No |Options for the item. | |Description |No |Description of the item. | |Disabled |No |If TRUE$ then the property cannot be disabled. | |ItemStyle |No |Style bits to control inline editing and color processing mode etc. | |Iconv |No |Validation string for the property. | |ErrorText |No |Error text to display when validation is displayed. | |DefaultValue|No |Value to use if the control contains no data. | |OptionValues|No |Internal values for use with a dropdown-list property item. | |DisplayName |No |Text to use when displaying the property item name. | ==== Returns ==== TRUE$ if the property was added successfully, FALSE$ otherwise. ==== Remarks ==== None. ==== Example ==== $Insert PS_Property_Grid_Equates $Insert Logical CtrlEntID = @Window : ".PRG_MAIN" // Set the full list of items... // // Data // Title - Yadda // SubTitle - Whatever // UI // Visible - TRUE$ // Color - 0xFF (red) Pgl = "Data" : @Vm : "Title" : @Vm : PS_PGI_EDIT$ : @Vm : "Yadda" Pgl<-1> = "Data" : @Vm : "SubTitle" : @Vm : PS_PGI_EDIT$ : @Vm : "Whatever" Pgl<-1> = "UI" : @Vm : "Visible" : @Vm : PS_PGI_CHECK$ : @Vm : TRUE$ Pgl<-1> = "UI" : @Vm : "Color" : @Vm : PS_PGI_COLORDLG$ : @Vm : 0xFF Call Set_Property_Only( CtrlEntID, "LISTX", Pgl ) // Add a new read-only text property to the Data Category Call Exec_Method( CtrlEntID, "ADD", "Data", "Notes", PGIT_STATIC$, "SomeText" ) // The full list of items now looks like: // // Data // Title - Yadda // SubTitle - Whatever // Notes - SomeText // UI // Visible - TRUE$ // Color - 0xFF (red) ==== See Also ==== N/A