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:
01620511
Vues:
37
>>>>Hi,
>>>>
>>>>I need help in finding the anchor value for a grid. The grid should grow both horizontally and vertically. But when it grows horizontally, it should maintain fix distance with the object to the right. Here is what works:
>>>>Value 130 does the job as far as horizontal resizing. That is, the grid expands horizontally but stays at fixed distance with the object to the right (container). But it does not expand vertically.
>>>>When I set the value to 15, the grid expands both horizontally and vertically but the the right edge of the grids goes over the object to the right.
>>>
>>>135 - Just double click the anchor property in the properties editor, it will give you a graphic representation of the value.
>>
>>Thank you. Yes, 135 works. I know that once I have the correct number I can view the representation in the property editor. The problem is that I could not figure how to arrive at this number, 135. Still don't.
>
>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 didn't realize that you can click on the bars to "play" with this setting. And thank you very much for the rest of the explanation.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform