Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox highlight method
Message
From
01/08/2008 09:43:56
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01335500
Message ID:
01335793
Views:
15
>When you drop down a combobox, a list appears. When you move the mouse over the items in the list they are highlighted. Is there an event that occurs as the items are highlighted?

the only simple way is that to bind a popup ... and to use old FOX popup commands...
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 = 9, ;
		Height = 24, ;
		Left = 36, ;
		Top = 48, ;
		Width = 100, ;
		Name = "Combo1"


	PROCEDURE itementer
		LPARAMETERS Enter,Bar,Popup
		WAIT WINDOWS IIF(m.Enter,"Enter on","Exit from")+STR(m.bar)+"  "+m.Popup NOWAIT
	ENDPROC


	PROCEDURE Destroy
		WAIT CLEAR
                RELEASE POPUP F1CB1
	ENDPROC


	PROCEDURE combo1.Init
		DEFINE POPUP F1CB1 RELATIVE
		DEFINE BAR 1 OF F1CB1 PROMPT 'ITEM1' && PICTURE ...
		DEFINE BAR 3 OF F1CB1 PROMPT 'ITEM2' && PICTURE ...
		DEFINE BAR 7 OF F1CB1 PROMPT 'ITEM3' && PICTURE ...
		ON			POPUP F1CB1 _SCREEN.ActiveForm.ItemEnter(.T.,BAR(),POPUP()) && you can put this method into the como class
		ON	EXIT	POPUP F1CB1 _SCREEN.ActiveForm.ItemEnter(.F.,BAR(),POPUP()) && you can put this method into the como class
		this.RowSource = 'F1CB1'
	ENDPROC


ENDDEFINE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform