Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: SelStart=0,SelLengh>0,align not left bad selection
Message
From
27/05/2004 10:10:48
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
BUG: SelStart=0,SelLengh>0,align not left bad selection
Miscellaneous
Thread ID:
00907723
Message ID:
00907723
Views:
44
On a TextBox,EditBox,Combobox,Spinner if Alignment is not Left,
with:
SelStart = 0
SelLength > 0
the selection area use the TextBox left Margin,
but for me the correct is the .Text Left Margin pixel.

Run this and move with left/right arrow:
PUBLIC oform1

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

DEFINE CLASS form1 AS form

	ADD OBJECT text1 AS textbox WITH ;
		Alignment = 1, ;
		Value = "  ABCD", ;
		Left = 70, ;
		Top = 38

	PROCEDURE text1.GotFocus
		this.SelStart=0
		this.SelLength=1
	ENDPROC

	PROCEDURE text1.Keypress(m.nKeyCode,m.nShiftAltCtrl)
		NODEFAULT
		TextBox::KeyPress(m.nKeyCode,m.nShiftAltCtrl)
		IF INSMODE()
			this.SelLength = 1
		ENDIF
	ENDPROC
	
ENDDEFINE
PS On Excel 2003 this same behaviour is present.
Then, or two bugs or MS have a different opinion respect to me.

Thanks

Fabio
Reply
Map
View

Click here to load this message in the networking platform