Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Left click to select on textbox scrolls past maxlength
Message
De
21/04/2004 10:15:36
 
 
À
21/04/2004 09:45:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00896831
Message ID:
00896881
Vues:
7
although as Sergey suggested, the code in the mouseup fixes the display afterwards (see text1 on the form compared to text2):
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

	PROCEDURE text1.MouseUp
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		This.SetFocus() 
	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"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform