Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Position in a Memo field (part 2)
Message
De
20/11/2008 12:37:51
 
 
À
20/11/2008 12:35:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01363222
Message ID:
01363239
Vues:
11
I tested it, and this should give you a good start.
*Gotfocus:
Local lnStart
this.AddProperty('cPretext','')
lnStart=At('4',cText) && cText is the initial text
this.cpretext=Left(cText,lnStart-1)
this.value=Substr(cText,lnStart)
*Lostfocus:
this.Value=this.cPretext+this.Value
cText=this.value
>Thanks for all the feedback Tore.
>
>>I don't think you will fine any easier solution, and it should be very easy to implement it this way.
>>
>>>So no better way huh?
>>>
>>>I mean nothing provided directly by VFP?
>>>
>>>I guess that sometimes I ask too much from that good 'ol VFP ;-)
>>>
>>>>I described that also in my other email. In gotfocus, you must separate the first part of the text, and put it in a variable. The rest is used at the value for the editbox. In the lostfocus you add the two pieces together again.
>>>>
>>>>>I have this in an EditBox
>>>>>
>>>>>1
>>>>>2
>>>>>3
>>>>>4
>>>>>=========
>>>>>5
>>>>>6
>>>>>7
>>>>>
>>>>>I'm able to position the cursor at the 5 when the user gives focus to the editbox. How could I make it that the 5 appears at the top of the editbox?
>>>>>
>>>>>so the user would see
>>>>>
>>>>>5
>>>>>6
>>>>>7
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform