Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SERIOUS BUG: editing in a textbox is problematic
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
SERIOUS BUG: editing in a textbox is problematic
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01046521
Message ID:
01046521
Vues:
59
Expected: SelStart has to be unchanged when Text doesn't change.

Observed: On a TextBox, and Spinner,Combobox ( what they contain a protected Texbox ),
directly changing Left,Top,Width,Height or with Anchor it resets SelStart.

There are a lot of other situations where Selstart is badly reseted,
but this is very annoying
( a consumer is writing and decides to resize the textbox:
Loses the Caret Position! and therefore it wastes time and therefore it loses money )
and it is not easy to find an effective workaround.

At least the editbox it doesn't have this defect

repro:
- run
- write into a control and move the mouse on form area or resize the form
PUBLIC oform1

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

DEFINE CLASS form1 AS form

	ADD OBJECT edit1 AS editbox WITH ;
		Anchor = 10, ;
		Height = 61, ;
		Left = 48, ;
		Top = 128, ;
		Width = 231, ;
		Name = "Edit1"


	ADD OBJECT spinner1 AS spinner WITH ;
		Anchor = 10, ;
		Height = 24, ;
		Left = 48, ;
		Top = 54, ;
		Width = 231, ;
		BackColor = RGB(255,128,128), ;
		Name = "Spinner1"


	ADD OBJECT combo1 AS combobox WITH ;
		Height = 25, ;
		Left = 48, ;
		Top = 90, ;
		Width = 231, ;
		BackColor = RGB(255,128,128), ;
		Name = "Combo1"

	ADD OBJECT text1 AS textbox WITH ;
		TabIndex = 1,;
		Anchor = 10, ;
		Height = 22, ;
		Left = 48, ;
		Top = 14, ;
		Width = 231, ;
		BackColor = RGB(255,128,128), ;
		Name = "Text1"

	PROCEDURE Init
		this.SetAll("Anchor",15)
	ENDPROC


	PROCEDURE MouseMove
		LPARAMETERS a,b,c,d
		this.SetAll("Left",20)
	ENDPROC

ENDDEFINE
Répondre
Fil
Voir

Click here to load this message in the networking platform