Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drop-down portion of combos
Message
 
 
To
23/08/2005 13:48:09
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01042920
Message ID:
01043018
Views:
18
Thanks. How did you find 23? In your sample it works, but with my combo class the drop down portion is bigger. I'll try another number, like 30.

>>
>>It works in VFP9. In VFP8 it remains the same width as the first time you Drop Down the combo.
>
>
>PUBLIC oform1
>
>oform1=NEWOBJECT("form1")
>oform1.Show
>RETURN
>
>DEFINE CLASS form1 AS form
>
>
>	Height = 250
>	Width = 136
>	DoCreate = .T.
>	Caption = "Form1"
>	Name = "Form1"
>
>
>	ADD OBJECT combo1 AS combobox WITH ;
>		ColumnCount = 2, ;
>		RowSourceType = 1, ;
>		RowSource = "aaaaaaaaaaaaaa1,,bbbbbbbbbb2,,cc3", ;
>		ColumnLines = .F., ;
>		Left = 12, ;
>		Top = 28, ;
>		Width = 100, ;
>		Name = "Combo1"
>
>	PROCEDURE combo1.DropDown
>	#IF VERSION(2)<900
>		this.ColumnCount = 2 && this.ColumnCount
>	#ENDIF
>		this.ColumnWidths = LTRIM(STR(this.Width-23))+',0'
>	ENDPROC
>
>	PROCEDURE resize
>		this.combo1.width=MAX(0, this.width-24)
>ENDDEFINE
>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform