Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Autoadjust width of dropdown part of dropdown list?
Message
 
 
À
11/04/2006 04:44:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01112297
Message ID:
01112428
Vues:
12
>I'd like for the dropdown list to adjust the width of the dropdown part to - as a minimum - have the width of the control.
>
>Boy, was that complicated to formulate!
>
>I hope you understand what I'm trying to say and appreciate your feedback.
*---------------------- 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 (Idea by Fabio Lunardon)
*		MODIFIED
*----------------------------------------------------------------
WITH this
    
	IF NOT .lDontAdjust AND .Width > 60 AND (.lAdjustWidth OR EMPTY(.ColumnWidths))
		.ColumnCount = MAX(.ColumnCount,2)
		.ColumnWidths = LTRIM(STR(.Width-IIF(.ListCount > EVL(.DisplayCount,7),40,40-SYSMETRIC(5)))) ;
			+ REPLICATE(',0',.ColumnCount-1)
		.lAdjustWidth = .t.	
	ENDIF
ENDWITH
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform