Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid anchor
Message
 
 
À
02/06/2015 11:10:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01620451
Message ID:
01622353
Vues:
74
>Hugo gave you easy way -- simply do it graphically. You double-click on the Anchor property to bring up the Anchor Editor, then you can graphically configure by clicking on the "bars" surrounding the object -- the "bars" cycle through values of "absolute" (gray), "relative" (black) and "none" (unfilled). The value for the anchor is displayed, as well as description.
>
>The "hard" way (or the way someone who tends to think in low-level -- e.g. using C or assembler -- is apt to view things) is to compute the value by combining bitmask values (see help topic on Anchor property):
>1 - absolute top ( 0000 0001 in binary )
>2 - absolute left ( 0000 0010 in binary )
>4 - absolute bottom ( 0000 0100 in binary )
>8 - absolute right ( 00001 000 in binary )
>16 - relative top ( 0001 0000 in binary )
>32 - relative left ( 0010 0000 in binary )
>64 - relative bottom ( 0100 0000 in binary )
>128 - relative right ( 1000 0000 in binary )
>256 - Horizontal fixed size ( 0001 0000 0000 in binary )
>512 - Vertical fixed size ( 0010 0000 0000 in binary )
>so to compute the value you were looking for in your original post:
>(absolute top) + (absolute left) + (relative right) + (absolute bottom) = 1 + 2 + 128 + 4 = 135

I have a similar problem and trying to figure out if I can use anchor or should code resize method instead. I have a few controls at the top of the form that I don't want to resize / change position, then I have an editbox, then a label underneath and then below another editbox. Both editboxes should be the same size and should resize with the form. The label beneath the first editbox should be always at the same position below that first editbox or just above the second (it's a description for the second editbox).

UPDATE. Went ahead with the Resize method.
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