Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox disabling items with \\ in list
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Combobox disabling items with \\ in list
Divers
Thread ID:
00609037
Message ID:
00609037
Vues:
46
I'm populating a combox with all the available printers on a machine. The printers are sharenames and look like "\\MyServer\MyPrinter".

The comboxbox rowSourceType = 5 - Array, and the rowsource = this.aList.

In the requery of the combo I put:
m.numOfPrinters = Aprinters(printerList)

If m.numOfPrinters  > 0
	Dimension This.alist[Alen(printerlist, 1), 2]
	Local i
	For m.i = 1 To Alen(printerList, 1)
		Local printerName
                ** Double all the backslashes so the items are not disabled.
		m.printerName = Strtran(printerList[m.i, 1], "\", "\\")
		This.alist[m.i, 1] = m.printerName
	Next
endif
The printers with "\\\\" in the beginning of the string are still showing up as disabled.

If I change the combo rowSourceType to 0 and use .addItem(m.printerName) they are NOT disabled.

Anyone know why it works differently depending on the rowSourceType?

tia
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform