grinder
Member
Hi there,
I have a little problem with a combobox and I don't get it ^^
There's a combobox which is filled with a list of some printers, not SESSION:GET-PRINTERS(), just a comma-separated string, e.g. "printer01,printer02,printer03,printer04,printer05,printer06,printer07,printer08,printer09,\\server\printer01,\\server\printer02,\\server\printer03,\\server\printer04,\\server\printer05,\\server\printer06,\\server\printer07,\\server\printer08,\\server\printer09"
All I want to do is to remove the network-printers.
This works only for each second (?) network-printer in this list. If I run this a second time, each network-printer is removed. But I don't want to run this twice.
I'm pretty sure that it must be something with the backslashs (also tried with CHR(92)).
Thx in advance.....
PS: Progress 11.3.3 and Windows environment.
I have a little problem with a combobox and I don't get it ^^
There's a combobox which is filled with a list of some printers, not SESSION:GET-PRINTERS(), just a comma-separated string, e.g. "printer01,printer02,printer03,printer04,printer05,printer06,printer07,printer08,printer09,\\server\printer01,\\server\printer02,\\server\printer03,\\server\printer04,\\server\printer05,\\server\printer06,\\server\printer07,\\server\printer08,\\server\printer09"
All I want to do is to remove the network-printers.
Code:
DO iCntr = 1 TO NUM-ENTRIES(cbPrinterList:LIST-ITEMS, ',':U):
IF SUBSTRING(ENTRY(iCntr,cbPrinterList:LIST-ITEMS,',':U),1,2) = '~\\':U THEN
cbPrinterList:DELETE(ENTRY(iCntr,cbPrinterList:LIST-ITEMS,',':U)).
END.
This works only for each second (?) network-printer in this list. If I run this a second time, each network-printer is removed. But I don't want to run this twice.
I'm pretty sure that it must be something with the backslashs (also tried with CHR(92)).
Thx in advance.....
PS: Progress 11.3.3 and Windows environment.