Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Autoresize Grid Column
Message
 
 
À
09/07/2005 07:17:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01030837
Message ID:
01030921
Vues:
26
Jim,

Thanks for posting the code.

Column resizing isn't a very clear cut thing at all. If there are too many columns to fit in the visible space and the rid gets larger in width does the user want to see more columns or do they want the currently visible columns to each get wider?

>I have been able to accomplish this by adding some custom methods to Greg Reichert's AutoResize class which is available in the downloads section here. Basically, you need to calculate the number of pixels that the grid width changes and distribute that number across the visible columns. Since a pixel is an integer, you must divide the change in pixels by the number of columns to be sized and apply the integer portion of the result to each column. Then you must calculate the remainder and apply it to one of the columns. The same strategy can be used to size a list box.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform