Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anchor Problem: resize a two column form
Message
From
05/06/2004 21:33:32
 
 
To
05/06/2004 12:22:26
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00910364
Message ID:
00910448
Views:
22
>A classic form layout is a two columns controls.
>
>With this, the space that separates the two columns is fixed (in example 10 points).


Hi Fabio,

This should do it:
PUBLIC oform1

oform1=NEWOBJECT("formAnchor")
oform1.Show
RETURN

DEFINE CLASS formAnchor AS form

	Height = 230
	Width = 330
	DoCreate = .T.
	Caption = "Here is a fixed 10 points column separator"
	MinWidth = 330
	Name = "Form1"
	Title = "Here is a fixed 10 points column separator"	

	ADD OBJECT container1 as containerAnchor1
	ADD OBJECT container2 as containerAnchor2

ENDDEFINE

DEFINE CLASS containerAnchor1 AS Container
	Height = 230
	Left = 0
	Top = 0
	Width = 165
	Anchor = 130
	BorderWidth =0

	ADD OBJECT text1 AS textbox WITH ;
		Anchor = 2+8, ;
		Height = 23, ;
		Left = 10, ;
		Top = 8, ;
		Width = 150, ;
		Name = "Text1"
ENDDEFINE

DEFINE CLASS containerAnchor2 AS Container
	Height = 230
	Left = 165
	Top = 0
	Width = 165
	Anchor = 32+8
	BorderWidth =0

	ADD OBJECT text2 AS textbox WITH ;
		Anchor = 2+8, ;
		Height = 23, ;
		Left = 5, ;
		Top = 8, ;
		Width = 150, ;
		Name = "Text2"
ENDDEFINE
Thanks,
Aleksey.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform