Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comboboxes internals
Message
From
23/08/2005 15:56:33
 
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:
01043044
Message ID:
01043052
Views:
19
This message has been marked as the solution to the initial question of the thread.
>Hi everybody,
>
>With the help of Fabio L I was almost able to achieve the desired functionality. With our font size (8) I found, that this code called from the combo Init works quite nicely:
>
>*---------------------- Location Section ------------------------
>*   Library: 	Acustomcontrols.vcx
>*   Class: 		Cboviscodes
>*   Method: 	Adjustwidth()
>*----------------------- Usage Section --------------------------
>*)  Description:
>*)
>
>*   Scope:      Public
>*   Parameters:
>*$  Usage:
>*$
>*   Returns:
>*--------------------- Maintenance Section ----------------------
>*   Change Log:
>*       CREATED 	08/23/2005 - NN (Ideas by Fabio Lunadron)
>*		MODIFIED
>*----------------------------------------------------------------
>WITH this
>	#IF VERSION(2)<900
>		.ColumnCount = MAX(.ColumnCount,.BoundColumn, 2)
>	#ENDIF
>
>	IF .Width > 60
>		.ColumnWidths = LTRIM(STR(.Width-39))+ REPLICATE(',0',.ColumnCount-1)
>	ENDIF
>ENDWITH
>
>
>The only problem I have, if there are few items in combo (less than 10) and the combo's scrollbar doesn't appear. In this case the drop-down portion is the scrollbar width shorter than than the combo's width. So, I have to make my logic more sophisticated and take this case into consideration.
>
>Any suggestions, how should I modify that code?
>
>Thanks in advance.
.ColumnWidths = LTRIM(STR(.Width-IIF(.ListCount>EVL(.DisplayCount,7),39+SYSMETRIC(5),39)));
+ REPLICATE(',0',.ColumnCount-1)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform