//Traverse all the widget instances in this cockpit. for(int i=0; i<ckptCurrent.Widgets.Count; ++i) { SAPbouiCOM.Widget wdt = (SAPbouiCOM.Widget)ckptCurrent.Widgets.Item(i); //ZERO based.
//Traverse all the keys. SAPbouiCOM.WidgetKeysParams wdtKeys = (SAPbouiCOM.WidgetKeysParams)wdt.GetKeyList(); for(int j=0; j<wdtKeys.Count; ++j) { //Get the key-value: string pairs. SAPbouiCOM.WidgetKeyParams wdtKeyValuePair = (SAPbouiCOM.WidgetKeyParams)wdtKeys.Item(j);
//Check the key-value. if(true == wdtKeyValuePair.Key.Equals("key") || true == wdtKeyValuePair.Value.Equals("value")) { //It is the value that was set last time, so desired widget instance found. Do something necessary now...