Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: EditBox IntegralHeight and Anchor
Message
From
07/03/2005 12:21:23
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
BUG: EditBox IntegralHeight and Anchor
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
00993329
Message ID:
00993329
Views:
75
When on a EditBox,
IntegralHeight = .T.
VFP uses ROUND(Height/LineHeight,0) for compute the EditBox Height.
This is mistaken because an visual control
does not have to occupy more area than that one assigned.
Now, with Anchor the node comes to the comb,
and to use Anchor with a EditBox with IntegralHeight = .T.
becomes problematic.

This code compare a editbox with a ListBox ( where, correctly, is used INT());
run and resize the form slowly:
PUBLIC oform1

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

DEFINE CLASS form1 AS form


	Top = 0
	Left = 0
	Height = 204
	Width = 375
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT container1 AS container1 WITH ;
		Anchor = 15, ;
		Top = 52, ;
		Left = 24, ;
		Width = 116, ;
		Height = 60, ;
		Name = "Container1"

	ADD OBJECT container2 AS container2 WITH ;
		Anchor = 15, ;
		Top = 4, ;
		Left = 188, ;
		Width = 116, ;
		Height = 184, ;
		Name = "Container2"

ENDDEFINE

DEFINE CLASS container1 AS container
	
	ADD OBJECT edit1 AS editbox WITH ;
		FontSize = 14, ;
		Anchor = 15, ;
		Height = 54, ;
		Left = 8, ;
		Top = 3, ;
		Width = 100, ;
		IntegralHeight = .T., ;
		Name = "Edit1"

ENDDEFINE

DEFINE CLASS container2 AS container
	
	ADD OBJECT list1 AS listbox WITH ;
		FontSize = 14, ;
		Anchor = 15, ;
		Height = 176, ;
		Left = 8, ;
		Top = 4, ;
		Width = 100, ;
		IntegralHeight = .T., ;
		Name = "List1"

ENDDEFINE
Fabio
Next
Reply
Map
View

Click here to load this message in the networking platform