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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force DROPDOWN in Combo

Status
Not open for further replies.

sridhar412

IS-IT--Management
Jun 4, 2002
19
0
0
IN
Without using supercombo

How can i force the dropdown of combobox?

Sridhar
 

in the "when" even of the combobox, type

keyboard '{ALT+DNARROW}'

torturedmind [trooper]

"It is much better to ask shallow questions than to wander in the depths of ignorance..."
 
Use KEYBOARD "{F4}" is better if you have to run in non-English environment.
 
Ok. i got it.

But how to define a method in a dynamically created object(combo)?

Sridhar
 
sridhar412

But how to define a method in a dynamically created object(combo)?

Define your combo object and add the "GotFocus" method. You can try the following in a small prg.

Code:
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
	DoCreate = .T.
	Caption = "Form1"
	Name = "FORM1"
	ADD OBJECT text1 AS textbox WITH ;
		Height = 23, ;
		Left = 60, ;
		Top = 60, ;
		Width = 100, ;
		Name = "Text1"
	ADD OBJECT text2 AS textbox WITH ;
		Height = 23, ;
		Left = 216, ;
		Top = 48, ;
		Width = 100, ;
		Name = "Text2"
        ADD OBJECT combo1 AS combobox WITH ;
		RowSourceType = 1, ;
		RowSource = "1,2,3,4,5,6,7,8", ;
		Height = 24, ;
		Left = 144, ;
		Top = 132, ;
		Width = 100, ;
		Name = "Combo1"
        PROCEDURE combo1.GotFocus
		KEYBOARD "{F4}"
	ENDPROC
ENDDEFINE


Mike Gagnon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top