guides:programming:programmers_reference_manual:values_property_propertygrid

VALUES property (PropertyGrid)

Gets or Sets the value of all property items in the control, or a single property item if indexed.

When non-indexed the VALUES property is an @fm-delimited array of property values, each of which depend on the type of property item they relate to. E.g. If the property item has a type of PGIT_COLOR$ then the VALUE property will be an RGB color value, if the property item has a type of PGIT_EDIT$ then the VALUE property will be a string, and so on.

When indexed the VALUES property refers to a single item.

In both cases the VALUES property uses the fully-expanded lists of items.

DevelopmentRuntimeIndexedScaledSynthetic
NoGet/SetItemPostion,PropertyNameNoNo

At runtime an individual property may be referenced via a row index value using the normal Get/Set_Property index parameter. The index value may be the Name of the property item (case-insensitive) or the Position of the property item in the fully expanded property list.

 
$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 : "ForeColor" : @Vm : PS_PGI_COLORDLG$ : @Vm : 0xFF

   

   Call Set_Property_Only( CtrlEntID, "LISTX", Pgl )

   

   // Get all the values

   Vals = Get_Property( CtrlEntID, "VALUES" )

   

   // Vals contains an @fm delimited array with the following data:

   //

   //    Yadda

   //    Whatever

   //    1

   //    255

   

   // Set the value of the ForeColor item to blue

   Call Set_Property_Only( CtrlEntID, "VALUES", 0xFF0000, "ForeColor" )
 
 
 

VALUE property

  • guides/programming/programmers_reference_manual/values_property_propertygrid.txt
  • Last modified: 2023/10/25 10:50
  • by 127.0.0.1