Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: EditBox IntegralHeight and Anchor
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
BUG: EditBox IntegralHeight and Anchor
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00993329
Message ID:
00993329
Vues:
74
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform