>>Hi,
>>
>>A while ago I have experimented a little with anchor property of text boxes and labels so that if a user increases the size of the window, these controls increase as well. At that time I didn't like the result. I wonder if anybody is using the anchor property for these controls and happy with the results?
>
>A sample:
>
>PUBLIC oform1
>
>oform1=NEWOBJECT("form1")
>oform1.Show
>RETURN
>
>DEFINE CLASS form1 AS form
>
>
> Top = 0
> Left = 0
> Height = 32
> Width = 146
> DoCreate = .T.
> Caption = "Form1"
> Name = "Form1"
>
>
> ADD OBJECT text1 AS textbox WITH ;
> Anchor = 15, ;
> Value = "Sample Text", ;
> Left = 5, ;
> Top = 5, ;
> Width = 133, ;
> Name = "Text1"
>
>
> PROCEDURE text1.Move
> LPARAMETERS nLeft, nTop, nWidth, nHeight
> this.FontSize = MIN(MAX(INT(21*(m.nHeight/21)^0.5) - 12,4),127)
> ENDPROC
>
>
>ENDDEFINE
>
Thank you, Fabio. It looks nice when I tried your example. I suppose I would have to add the .Move method to the base class of my textbox, to make it work for all of them, right?
"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