I am using PBWin9.0.1 and DDT. I am trying to print selected items from a multiple selection list box, using Listbox Get Select and Listbox Get Text.
The only way I can make it work is the code below. I have to unselect each item as I go, so Listbox Get Select can get the next selected item index number.
I would think there would be a better way.
Any help and explanation would be appreciated.
John Tate
The only way I can make it work is the code below. I have to unselect each item as I go, so Listbox Get Select can get the next selected item index number.
I would think there would be a better way.
Any help and explanation would be appreciated.
John Tate
Code:
SUB printSelections(hDlg AS DWORD) OPEN "selected.txt" FOR OUTPUT AS #9 LOCAL I,numselected,index,mx AS LONG LOCAL tempvar AS STRING LISTBOX GET SELCOUNT hDlg,%idc_listbox7 TO numselected FOR I = 1 TO numselected LISTBOX GET SELECT hDlg,%idc_listbox7 TO index LISTBOX GET TEXT hDlg,%idc_listbox7 ,index TO tempvar PRINT #9,tempvar LISTBOX UNSELECT hDlg,%idc_listbox7,index NEXT CLOSE 9 DLLPRINT hDlg,"selected.txt,,,/PP" END SUB
Comment