Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rowsourcetype = Array
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00875272
Message ID:
00875274
Views:
16
It's better to populate listbox with Additem. This way you can take care about backslashes at the begiining of the printers name.
LOCAL ARRAY laPrinters[1]
IF APRINTERS(laPrinters) > 0
	This.ColumnCount = 2
	This.ColumnWidths = "150,120"
	FOR i=1 TO ALEN(laPrinters,1)
		* Double backslashes so item wouldn't be disabled
                laPrinters[i,1] = STRTRAN(laPrinters[i,1], "\", "\\")
		This.AddItem(laPrinters[i,1])
		This.List[This.NewIndex, 2] = laPrinters[i,2]
	ENDFOR
ENDIF
This.ListIndex = 1
>Hi all,
>
>
>
>IF APRINTERS(gaPrinters) > 0
>This.columcount = 2
>This.columnWidth = “150,120”
>  THIS.ROWSOURCETYPE = 5
>  THIS.ROWSOURCE = 'gaPrinters'
>ENDIF
>
>FOR x = 1 TO THIS.LISTCOUNT
>  THIS.PICTURE(x) = "Print.bmp"
>ENDFOR
>
>This.ListIndex = 1
>
>
>
>I want to show the printers available.
>When I place this code in the init(), one 4 empty bars.
>Which error exists you there ?
>
>Thank in advance for help ...
>
>bernhart
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform