Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anchor use for the rest of us
Message
 
 
To
02/03/2008 13:27:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01298048
Message ID:
01298056
Views:
34
>>Hello friends,
>>
>>I have read the VFP help on Anchor property, searched here on UT for some messages on Anchor. The VFP Help goes over my head. The few messages that I read suggest some numbers to use. Like in one message a guru suggest to set anchor value to 768, 45, 135; but no explanation on how these numbers derived. So I am wondering, is there an article on the web or on UT that has an explanation of use of Anchors for Dummies <g>
>>
>>Thank you in advance for your help.
>
>In every case, the anchor value should be the sum of some of the powers of two that appear in the help.
>
>E.g. 768 = 512 + 256, that is, vertical fixed size and horizontal fixed size.
>
>In this example, I first determined the highest power of two that fits (512), and then subtracted to see how much was missing. Then, obtain the next power of two.
>
>Another example, showing all the steps:
>45 = 32 + 23
>45 = 32 + 16 + 7
>45 = 32 + 16 + 4 + 3
>45 = 32 + 16 + 4 + 2 + 1
>
>Now, look up in the help, what every one of these values does.
>
>When writing this value in code, instead of writing:
>
>
>SomeObject.Anchor = 768
>
>
>better change it to something like this, which makes the result more readable:
>
>
>#define ANCHOR_HORIZONTAL_FIXED_SIZE 512
>#define ANCHOR_VERTICAL_FIXED_SIZE 256
>...
>SomeObject.Anchor = ANCHOR_HORIZONTAL_FIXED_SIZE + ANCHOR_VERTICAL_FIXED_SIZE
>
>
>The #define commands would be placed in an include file.

Thank you for detailed explanation. This and the builder should be very helpful!
"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
Previous
Reply
Map
View

Click here to load this message in the networking platform