Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic sizing of text boxes
Message
De
31/12/1997 19:05:36
 
 
À
31/12/1997 16:53:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00068695
Message ID:
00068730
Vues:
26
>>>I am writing a VFP5.0 application that will be used on WIN95 PC's that have several different screen resolutions. I was going to make the forms sizable, but then I realized that the text boxes contained on the forms wouldn't change size, so all I would get is the same size text boxes with more blank space around them. Does anyone have any ideas on how to get around this in VFP?
>>
>>Test for resolution and change the width properties, fonts, etc of each object.
>>
>>DJ :o)
>
>Is there a VFP call to get the resolution or would I have to make an API call?

_screen.width and _screen.height have the # of pixels for the screen.

I have pretty much finished doing just exactly what you are thinking of doing for a client. I'm getting ready
to start testing it.

Some of the problems I have run across.

1. Make sure the relative width X height is the same no matter what the size of the form.
i.e. if you start with a form that is 300 X 400 always make sure that the width is 4/3 of the height. If you
don't it will really mess up the position of you controls. IOW use the same factor to increase/decrease the
height,width,left,top properties.

2. I found it better to NOT adjust the height of txtBoxes, just set the IntegralHeight to .T.

3. When you drill down into grids, be aware that setting the fontsize of the grid also changes the fontsize
of the columns and the controls in the columns, and changing the fontsize in the columns changes the fontsize
of the controls in the column.

4. Don't forget to change the ColumnWidths of Combos and ListBoxes.

HTH

Bill
Bill Morris
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform