Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 Tags
Subject: RE: write direction
Thread ID: 395410 Message ID: 395576 # Views: 42 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Wednesday, January 15, 2014 11:37:41 PM         
   


> >
PUBLIC oFrm
> > oFrm=CREATEOBJECT("MyForm")
> > oFrm.show()
> > DEFINE CLASS MyForm as Form
> > 	ADD OBJECT txt1 as textbox WITH width=200,value=SPACE(240)
> > 	PROCEDURE txt1.Keypress
> > 		LPARAMETERS nKey,nShift
> > 		IF nKey>=32 AND nShift=0
> > 			NODEFAULT
> > 			DODEFAULT(nKey,nShift)
> > 			This.SelStart=MAX(This.SelStart-1,0)
> > 		ENDIF
> > 	ENDPROC
> > ENDDEFINE

> Although I never had any use of it, I remember experimenting in the past and ended up with solution similar to yours but I used KEYBOARD '{LEFTARROW}' in place of the interesting NODEFAULT + DODEFAULT pairs which I found rather 'confusing' in meaning ( ~ quickly move while stay put please! :-) ) - So then I had it without them at all like this:
> 	IF nKey>=32 AND nShift=0
> 	***  NODEFAULT
> 	***  DODEFAULT(nKey,nShift)
> 	**** This.SelStart=MAX(This.SelStart-1,0)
>              KEYBOARD '{LEFTARROW}'
> 	     CHR(LASTKEY())
> 	ENDIF
> 

> My respects
>
> .


That is long. To transpose entries in a textbox, you can simply do this:

* Textbox InteractiveChange Event
This.Value = This.Value


:)



https://vfpx.codeplex.com/releases/view/99045
http://sandstorm36.blogspot.com

ENTIRE THREAD

write direction Posted by George High @ 1/14/2014 6:40:09 PM
RE: write direction Posted by Tore Bleken @ 1/14/2014 6:53:05 PM
RE: write direction Posted by Vilhelm-Ion Praisach @ 1/14/2014 8:11:01 PM
RE: write direction Posted by David Mustakim @ 1/15/2014 6:38:04 AM
RE: write direction Posted by Vilhelm-Ion Praisach @ 1/15/2014 7:08:44 AM
RE: write direction Posted by Jun Tangunan @ 1/15/2014 11:37:41 PM
RE: write direction Posted by David Mustakim @ 1/16/2014 2:28:43 AM
RE: write direction Posted by George High @ 1/15/2014 3:10:22 PM
RE: write direction Posted by David Mustakim @ 1/15/2014 3:44:52 PM
RE: write direction Posted by George High @ 1/15/2014 4:47:39 PM
RE: write direction Posted by David Mustakim @ 1/15/2014 4:58:54 PM
RE: write direction Posted by Zia Mughal @ 1/15/2014 9:25:43 AM