>>Exactly. And your example works in a small .prg file. Thank you.
>>
>>But when I set the value of my edit boxes to the same values as you have, it does not work. The issue must be that my edit boxes are in a container which is inside a page of a pageframe. And I set the anchor values in the INIT method of the form. Could it be that the anchor value of the PageFrame or the container is causing the problem?
>
>
>Are you changing width/height or the edit boxes before changing the anchor? This might be a problem, if you are doing something like that, first you need to set the anchor to zero, then adjust width/height and then set the anchor to whatever value you need.
>
>I do not think that having the edit boxes in containers should make a difference:
>
>
>loForm = CREATEOBJECT('myForm')
>loForm.Show(1)
>
>DEFINE CLASS myForm as Form
> height = 450
> ADD OBJECT myContainer as myContainer WITH top =0, left = 0, width = 220, height = 420, anchor = 15
>ENDDEFINE
>
>DEFINE CLASS myContainer as Container
> ADD OBJECT myTopEditBox as EditBox WITH top = 5, width = 200, height = 200, left = 5, anchor = 75
> ADD OBJECT myBotEditBox as EditBox WITH top = 210, width = 200, height = 200, left = 5, anchor = 30
>enddefine
>
Hi Hugo,
How do I modify your sample code to "instroduce" a PageFrame. I just want to see if it will change how it works in your sample code.
I added a new (empty) PageFrame to my "complicated" form and dropped two Edit boxes on this empty PageFrame. And the anchor DOES NOT work correctly. Then I dropped two Edit boxes on the same form, away from the PageFrame. And this time the Anchor WORKS.
I would like to see if this is just my form where PageFrame "acts up" or in a sample form it will do the same.
"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