Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: EditBox IntegralHeight and Anchor
Message
 
 
À
07/03/2005 12:21:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00993329
Message ID:
00993666
Vues:
12
Looks like a bug to me. It's even more visible when you make listbox the same size as editbox an put them side by side.
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 = 4, ;
		Left = 24, ;
		Width = 116, ;
		Height = 60, ;
		Name = "Container1"

	ADD OBJECT container2 AS container2 WITH ;
		Anchor = 15, ;
		Top = 4, ;
		Left = 188, ;
		Width = 116, ;
		Height = 60, ;
		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 = 54, ;
		Left = 8, ;
		Top = 4, ;
		Width = 100, ;
		IntegralHeight = .T., ;
		Name = "List1"

ENDDEFINE
>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:
<snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform