Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comobox question 1

Status
Not open for further replies.

yellowke

Programmer
Nov 5, 2002
48
BE
Hi, is it possible to set the rowsourcetype of a combobox to value (1) and after that give it the following Rowsource:
€ 359,95
€ 400,56
€ 550,78

the problem is that foxpro makes of this:
€ 359
95
€ 400
56
€ 550
78

Is it possible to go around the comma delimiter?
 
yellowke

I believe your workaround (since VFP considers values to be seperated with commas) would be to create a cursor with one field holding your values and use "Field" as rowsource type. Copy the following in a program and run it to se how it works.
Code:
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"
	ADD OBJECT combo1 AS combobox WITH ;
		RowSourceType = 6, ;
		RowSource = "mycursor.value", ;
		Height = 24, ;
		Left = 96, ;
		Top = 60, ;
		Width = 180, ;
		Name = "Combo1"
	PROCEDURE Load
		CREATE CURSOR myCursor (value c(10))
		INSERT INTO myCursor (value) VALUES ("€ 359,95")
		INSERT INTO myCursor (value) VALUES ("€ 400,56")
		INSERT INTO myCursor (value) VALUES ("€ 550,78")
		GO top
	ENDPROC
ENDDEFINE
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top