Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems ( B.. ): DropCombo error on selected item
Message
From
30/01/2004 06:29:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Problems ( B.. ): DropCombo error on selected item
Miscellaneous
Thread ID:
00872228
Message ID:
00872228
Views:
50
Hi,

run this repro, and click on Button,
you see that, when the list is opened,
selected item is incorrect.
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT command1 AS commandbutton WITH ;
		AutoSize = .T., ;
		Top = 7, ;
		Left = 20, ;
		Height = 27, ;
		Width = 108, ;
		Caption = "DropComboBug", ;
		Name = "Command1"


	ADD OBJECT combo1 AS combobox WITH ;
		Left = 15, ;
		Top = 44, ;
		Width = 100, ;
		Name = "Combo1"


	PROCEDURE command1.Click
		WITH m.THISform.Combo1
			.Removeitem(1)
			.AddItem("Item2",1)
			.Removeitem(2)
			.AddItem("Item1",2)
			.Setfocus
		ENDWITH
	ENDPROC


	PROCEDURE combo1.GotFocus
		KEYBOARD '{ALT+DNARROW}'
	ENDPROC


	PROCEDURE combo1.Init
		THIS.AddItem("Item1",1)
		THIS.AddItem("Item2",2)
		this.ListIndex = 1
	ENDPROC


ENDDEFINE
With DropList, the combobox is correct,
respect the listIndex and change the DisplayValue.

Fabio
Next
Reply
Map
View

Click here to load this message in the networking platform