WireLess Studio Widgets Developer's Guide |
This method retrieves the currently selected column on a WS_LIST_CTRL
SHORT GetSelectedColumnByName(LPCTSTR sObjectName);
SHORT GetSelectedColumnById(SHORT usObjectId);
On success, GetSelectedColumn returns the zero based index of the selected column on a widget. If there's no column selected, GetSelectedColumn returns -1. On error GetSelectedItem returns 32767. To get extended information, call WStError::GetLastErrorCode.
Public wsWidget As New WStWidget Case "myListCtrl" If wsWidget.GetLastClickEventTypeByName("myListCtrl") = WS_CLICK_EVENT_ON_ITEM Then iSelectedRow = wsWidget.GetSelectedItemByName("myListCtrl") sIntVal = iSelectedRow sEventValue = "Row: " + sIntVal + " Str: " + _ wsWidget.GetRowTextByName("myListCtrl", iSelectedRow, 0) ElseIf wsWidget.GetLastClickEventTypeByName("myListCtrl") = WS_CLICK_EVENT_ON_HEADER Then sIntVal = wsWidget.GetSelectedColumnByName("myListCtrl") sEventValue = "Column: " + sIntVal End If
WStWiget class reference | WStForm class reference | WStFactory class reference | WStError class reference
WireLess Studio by SofToGo S.A. | Visit our site www.softogo.com | Contact us help@softogo.com |