Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: system Listboxes list box checkboxes check box
Here's a script fragment that seems to work for "*SOME*" List Box controls with Check boxes. It clears and then restores the selected items.
; Get text associated with every list item. AllText = cGetLBText(hwnd) ; Get the selected item's text. SelText = cGetLBSelText(hwnd) if SelText == "*EMPTY*" message( "cGetLBSelText", "No selected items.") exit endif ; Clear the current selection. if !cclearlball(hwnd) goto ahem endif ;Restore the orginal selection. SelectCount = Itemcount(SelText, @tab) for i=1 to SelectCount ItemText = ItemExtract(i, SelText, @tab) Index = ItemLocate(ItemText, AllText, @tab) ; Select an item from the list control. if !csetlbitemex(hwnd, index) goto ahem endif next exit :ahem message("We Blew up", "Should not be here.") exit
;make sure the "NetBeui properties" window is open ;and the "bindings" tab is selected before running.... AddExtender("wwctl34I.dll") hwnd=DLLHWND("IPX/SPX-compatible Protocol Properties") child2hwnd=cWndbyName(hwnd,"Bindings") listboxhwnd=cWndbyID(child2hwnd,206); Get text associated with every list item. AllText = cGetLBText(listboxhwnd) message("List of text in list box",alltext) ; Get the selected item's text. SelText = cGetLBSelText(listboxhwnd) if SelText == "*EMPTY*" message( "cGetLBSelText", "No selected items.") exit endif message("List of SELECTED text in list box",seltext) ;exit ; Clear the current selection. if !cclearlball(listboxhwnd) goto ahem endif ;Restore the original selection. SelectCount = Itemcount(SelText, @tab) for i=1 to SelectCount ItemText = ItemExtract(i, SelText, @tab) Index = ItemLocate(ItemText, AllText, @tab) ; Select an item from the list control. if !csetlbitemex(listboxhwnd, index) goto ahem endif next exit :ahem message("We Blew up", "Should not be here.") exit
Article ID: W12509
Filename: How to deal with SOME Listboxes that have check boxes.txt
File Created: 2001:03:02:14:37:00
Last Updated: 2001:03:02:14:37:00