realbasic-nug.it
[Top] [All Lists]

Re: Cursore in EditField

To: REALbasic NUG Italian <realbasic-nug dot it at lists dot realsoftware dot com>
Subject: Re: Cursore in EditField
From: Giovanni Gualeni <ggualeni at tiscali dot it>
Date: Wed, 27 Feb 2008 15:11:01 +0100
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug dot it at lists dot realsoftware dot com
References: <7E7A0CD7-2637-4D0C-95EA-BFE78D99F4A4 at tin dot it> <3C654623-2768-49D1-AF82-611D3606AFF3 at tin dot it> <F3AA0DE2-2445-4F59-8127-0059F09832AD at yahoo dot it>
Il giorno 27/feb/08, alle ore 15:03, Massimo Valle ha scritto:

dotpos=InStr(me.text,".")

if dotpos <> 0 then
MsgBox "Attenzione, inserire la virgola come separatore dei decimali!"
  'me.text=""
  me.text=replace(me.Text,".",",")
me.SelStart=dotpos <<<<<----------------------- la magia sta tutta qui....
else
  App.ResetResult()
end if

Però mi domando cosa rispondo a fare alle tue domande. Se guardavi il mio esempio nel tuo post relativo ai numeri decimali trovavi questo:
Function KeyDown(Key As String) As Boolean
if key = "." then
  dim insertionPoint as integer = me.selStart
  if instr(me.text, ",") = 0 then
me.text = left(me.text, insertionPoint) + "," + mid(me.text, insertionPoint+1)
    me.selStart = insertionPoint+1
  end if
  return true
end if
End Function

Significa che non lo hai nemmeno provato.

Massimo Valle


Oltretutto c'e' pure un errore ;-) ma non facciamoci il sangue amaro, probabilmente non l'ha fatto apposta.
-----------------
Giovanni Gualeni - 3D



<Prev in Thread] Current Thread [Next in Thread>