Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anybody is using Anchor for Textboxes?
Message
From
13/12/2011 11:42:35
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01530880
Message ID:
01530978
Views:
63
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform