Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox behavior using DropDown event
Message
From
01/10/2004 11:36:57
 
 
To
01/10/2004 10:53:57
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00947940
Message ID:
00947964
Views:
15
Hi Fabio,

I changed the container class from a Form to a Toolbar (my actual implementation) and it does not work anymore. Any ideas?
PUBLIC oform1,Choice

Choice=0

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

DEFINE CLASS form1 AS toolbar


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

	ADD OBJECT optiongroup1 AS optiongroup WITH ;
		ControlSource = "m.Choice",;
		ButtonCount = 2, ;
		Value = 2, ;
		Height = 46, ;
		Left = 24, ;
		Top = 72, ;
		Width = 132, ;
		Name = "Optiongroup1", ;
		Option1.Caption = "Option1", ;
		Option1.Value = 0, ;
		Option1.Height = 17, ;
		Option1.Left = 5, ;
		Option1.Top = 5, ;
		Option1.Width = 61, ;
		Option1.Name = "Option1", ;
		Option2.Caption = "Option2", ;
		Option2.Value = 1, ;
		Option2.Height = 17, ;
		Option2.Left = 5, ;
		Option2.Top = 24, ;
		Option2.Width = 61, ;
		Option2.Name = "Option2"


	ADD OBJECT combo1 AS combobox WITH ;
		ColumnCount = 2, ;
		ColumnWidths = "100,200", ;
		Height = 24, ;
		Left = 192, ;
		Top = 72, ;
		Width = 100, ;
		Name = "Combo1",;
		Choice = 0,;
		RowSourceType = 3 ,;
		RowSource = "select * from test where f1= m.Choice into cursor cxxx"

	PROCEDURE Init
		create cursor test (f1 i, f2 c(10))
		insert into test values (1, "Hello")
		insert into test values (1, "World")
		insert into test values (2, "How")
		insert into test values (2, "are")
		insert into test values (2, "you?")
	ENDPROC

	PROCEDURE combo1.Gotfocus
		this.Requery()
	ENDPROC

ENDDEFINE
ramil
~~ learning to stand still
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform