Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TxtBox Screen Location
Message
 
 
À
17/07/1998 10:31:06
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00117562
Message ID:
00119495
Vues:
45
Bruce,

Here's an example, the font object is just a thin wrapper around the fontmetroc functions.
         local loFont, lnRow, lnCol
         set classlib to ccontrol additive
         loFont = CreateObject( "Font" )
         lnRow = ( thisform.Top + loControl.Top ) / loFont.FontMetric( 1, thisform )
         lnCol = ( thisform.Left + loControl.Left ) / loFont.FontMetric( 6, thisform )

         if ( ! loFont.EqualFont( _screen, thisform ) )
            lnRow = lnRow * ( loFont.FontMetric( 1, thisform ) + loFont.FontMetric( 5, thisform ) ) / ;
                            ( loFont.FontMetric( 1, _screen ) + loFont.FontMetric( 5, _screen ) )
            lnCol = lnCol * loFont.FontMetric( 6, thisform ) / loFont.FontMetric( 6, _screen )
         endif
         
         wait window "This field must be filled in" + chr(7) at lnRow, lnCol nowait
>Nope - don't have that book. Haven't had a chance to play with it yet but this has made me go back and look at what exactly foxels are. For the important things I do look up references and examples but for nice to have tidy up stuff, sometimes I just enjoy playing around. You never know what you'l discover! Thanks for all your help and I'll let you know what happens.
>
>>Bruce,
>>
>>ObjToClient along with the FontMetric() using the AverageWidth and you need Height and Leading for vertical positioning. Do you by change have the ProsTalk VFP book? I had some code like that in the ContextMenu class.
>>
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