la domanda è : come faccio a spostare il controllo su un bottone, in modo che mi esegua il LostFocus? Dovrebbe essere tipo Bottone.GetFocus, ma dove metto questa istruzione in modo che possa essere eseguita ?
'
' Gestione campo TB_PesoModificato
'
PUBLIC SUB TB_PesoModificato_GotFocus()
PesoModificato = PesoAttuale
TB_PesoModificato.Alignment = Align.left
TB_PesoModificato.text = PesoModificato
END
PUBLIC SUB TB_PesoModificato_KeyPress()
SELECT Key.code
CASE Key.Enter, Key.BackSpace, Key.Delete, Key.Left, Key.Right, Key.Return, Key.space
RETURN
END SELECT
IF Key.Text LIKE "+" OR Key.Text LIKE "-" OR Key.Text LIKE "." THEN RETURN
IF NOT IsDigit(key.text) THEN
STOP EVENT
ENDIF
END
PUBLIC SUB TB_PesoModificato_LostFocus()
PesoModificato = Val(TB_PesoModificato.text)
TB_PesoModificato.Alignment = Align.Right
TB_PesoModificato.text = Format$(PesoModificato, "000.00")
END