====== POSBYNAME method (PropertyGrid) ====== ==== Description ==== Returns the position of the named item in the "visible" list. ==== Syntax ==== itemPos = Exec_Method( ctrlEntID, "POSBYNAME", name ) ==== Parameters ==== ^Name^Required^Description^ |name|Yes|Name of the Property Item to find| ==== Returns ==== The position of the named item, or null if the item is not visible. ==== 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 ) // Hide all "Data" items... Call Exec_Method( CtrlEntID, "COLLAPSE", "Data" ) // Get the position of the "Color" item (returns "2" ) ItemPos = Exec_Method( CtrlEntID, "POSBYNAME", "Color" ) // Get the position of the "SubTitle" item (returns null // because it's hidden) ItemPos = Exec_Method( CtrlEntID, "POSBYNAME", "SubTitle" ) ==== See Also ==== N/A