Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Left click to select on textbox scrolls past maxlength
Message
From
21/04/2004 10:08:34
 
 
To
21/04/2004 09:45:34
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00896831
Message ID:
00896877
Views:
11
Hi Chris,

It appears that it only happens on controls with proportional fonts. It doesn't matter what the textbox width is. See the example:
oform = NEWOBJECT('formtest')
oform.show()
READ EVENTS


**************************************************
*-- Class:        formtest
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   04/21/04 10:06:04 AM
*
DEFINE CLASS formtest AS form


	Top = -1
	Left = 0
	DoCreate = .T.
	ShowTips = .T.
	Caption = "Test Form"
	Name = "FrmTest"
	Width = 270
	Height = 250
	AutoCenter = .T.


	ADD OBJECT cmdclose AS commandbutton WITH ;
		Top = 192, ;
		Left = 85, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Close", ;
		Name = "cmdclose"


	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "m.fname", ;
		Format = "!", ;
		Height = 23, ;
		InputMask = "XXXXXXXXXXXXXXX", ;
		Left = 48, ;
		Top = 36, ;
		Width = 168, ;
		Name = "Text1"


	ADD OBJECT text2 AS textbox WITH ;
		ControlSource = "m.lname", ;
		Format = "!", ;
		Height = 23, ;
		Left = 48, ;
		MaxLength = 15, ;
		Top = 72, ;
		Width = 168, ;
		Name = "Text2"


	ADD OBJECT text3 AS textbox WITH ;
		FontName = "Courier New", ;
		ControlSource = "m.fname", ;
		Format = "!", ;
		Height = 23, ;
		InputMask = "XXXXXXXXXXXXXXX", ;
		Left = 48, ;
		Top = 108, ;
		Width = 168, ;
		Name = "Text3"


	ADD OBJECT text4 AS textbox WITH ;
		FontName = "Courier New", ;
		ControlSource = "m.lname", ;
		Format = "!", ;
		Height = 23, ;
		Left = 48, ;
		MaxLength = 15, ;
		Top = 144, ;
		Width = 168, ;
		Name = "Text4"


	PROCEDURE Init
		PUBLIC m.fname, m.lname
		m.fname='ABCDEFGHIJKLMNO'
		m.lname = 'ABCDEFGHIJKLMNO'
		DODEFAULT()
	ENDPROC
	
	PROCEDURE Destroy
		CLEAR EVENTS
		DODEFAULT()
	ENDPROC

	PROCEDURE cmdclose.Click
		thisform.release()
	ENDPROC


ENDDEFINE
*
*-- EndDefine: formtest
**************************************************
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform