oi10:presentation_server:valuebypos_method_propertygrid

VALUEBYPOS method (PropertyGrid)

Returns the value of the specified property item using its position in the "visible" list.

itemValue = Exec_Method( ctrlEntID,    

                            "VALUEBYPOS", 

                            itemPos,      

                            newValue )
 
NameRequiredDescription
itemPosYesPosition of the property item in the visible list
newValueNoNew value for the property

Value of the specified property item.

The value depends on the type of the property item. If the property item has a type of PGIT_COLOR$ then the returned data will be an RGB color value, if the property item has a type of PGIT_EDIT$ then the value will be a string, and so on.

 
$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 )

   

   // Hide all "Data" items...

   Call Exec_Method( CtrlEntID, "COLLAPSE", "Data" )

   

   // Get the value of the "Color" item, now at position 2)

   ItemVal  = Exec_Method( CtrlEntID, "VALUEBYPOS", 2 )
 
 
 
  • oi10/presentation_server/valuebypos_method_propertygrid.txt
  • Last modified: 2023/10/25 10:49
  • by 127.0.0.1