Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
STRTRANS and Slashes
Message
De
11/12/2007 09:38:58
 
 
À
10/12/2007 20:45:12
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01274617
Message ID:
01274763
Vues:
13
PMFJI, so,
Have this code for if they enter it by hand. And have code in the getdir button function that does your strtran there?

HTH
Beth

>I like it! But, now I have an embarrasing development. The textbox value could also be populated using the GETDIR function, so there may not be any KeyPress events fired. Sorry...
>
>>Well, making it more complicated just so not to use variables <g>
>>
>>
>>loForm			= Createobject('myForm')
>>loForm.Show(1)
>>
>>define class myForm as Form
>>	add object myTextBox as Textbox
>>
>>	procedure myTextBox.KeyPress(nKeyCode, nShiftAltCtrl)
>>
>>		nodefault
>>		if nKeyCode # 92 or At('\', this.Value) = 0
>>			Dodefault(nKeyCode, nShiftAltCtrl)				
>>			if ((nKeyCode = 92) or (nKeyCode = 127 and substr(this.Value, this.SelStart, 1) == '\' and substr(this.Value, this.SelStart - 1, 2) # '\\')) and nShiftAltCtrl = 0
>>				Dodefault(nKeyCode, nShiftAltCtrl)
>>			endif
>>		endif
>>
>>	endproc
>>
>>enddefine
>>
>>
>>[Update] By the way, I realize that you can still press DEL or select text and then overwrite/delete, but do not feel like adding more code, after all this might not even be what Jay needs, maybe I completely misunderstood him.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform