TextField autofill

  1. 5 months ago

    How I do to when put a value in a Textfield, autofill another Textfield with the same value. I try with TextChange but doesn't work.

    If in TextField2 TextChange event you place :

    TextField34.Text = me.Text TextField34.Invalidate

    It should work right away.

  2. Tim P

    May 18 Pre-Release Testers, Xojo Pro

    What was the code you had used? This should be relatively simple, so it's likely a misunderstanding with your code.

  3. Cho S

    May 18 1.282150° N, 103.863861° E

    @Ivan O How I do to when put a value in a Textfield, autofill another Textfield with the same value. I try with TextChange but doesn't work.

    If you input into TextField1 and you want TextField2 to auto show, add EventHandler TextChange to TextField1 to capture changes there. Put this codes in the TextField1 TextChange EventHandler:

    TextField2.Text = TextField1.Text

  4. I have this code in the Textfield2.text. Only I need the value that the user put in this field appear in the Textfield34.text
    The code TextField2.Text = TextField34.Text doesn't work.

    dim cantidads as currency = CDbl(TextField2.text)
    dim porcientomip as double = CDbl(TextField8.text)
    dim total as double =(cantidads * porcientomip) /100
    dim totalfinal as String = str((total), "$###,##0.00")

    Label32.text = totalfinal

    dim cantidads2 as currency = CDbl(TextField2.text)
    dim porcientomip2 as double = CDbl(TextField8.text)
    dim total2 as double =(cantidads2 * porcientomip2) /100
    dim totalfinal2 as String = str((total2), "$###,##0.00")

    Label33.text = totalfinal2

    dim cantidads3 as currency = CDbl(TextField3.text)
    dim porcientomip3 as double = CDbl(TextField8.text)
    dim total3 as double =(cantidads3 * porcientomip3) /100
    dim totalfinal3 as String = str((total3), "$###,##0.00")

    Label34.text = totalfinal3

    dim cantidads4 as currency = CDbl(TextField2.text)
    dim porcientomip4 as double = CDbl(TextField11.text)
    dim total4 as double =(cantidads4 * porcientomip4) /100
    dim totalfinal4 as String = str((total4), "$###,##0.00")

    Label40.text = totalfinal4

    dim cantidads5 as currency = CDbl(TextField2.text)
    dim porcientomip5 as double = CDbl(TextField12.text)
    dim total5 as double =(cantidads5 * porcientomip5) /100
    dim totalfinal5 as String = str((total5), "$###,##0.00")

    Label41.text = totalfinal5

    dim cantidads6 as currency = CDbl(TextField2.text)
    dim porcientomip6 as double = CDbl(TextField13.text)
    dim total6 as double =(cantidads6 * porcientomip6) /100
    dim totalfinal6 as String = str((total6), "$###,##0.00")

    Label42.text = totalfinal6

    dim originacion as double = CDbl(Label40.text)
    dim descuento as double = CDbl(Label41.text)
    dim prepagados as double =CDbl(Label42.text)
    dim total7 as double = originacion + descuento + prepagados
    dim totalfinal7 as String = str((total7), "$###,##0.00")

    Label43.text = totalfinal7

    dim cf as double = CDbl(TextField2.text)
    dim interes as double = CDbl(TextField7.text)
    dim termino as double = CDbl(TextField6.text)
    dim totali as double = interes / 100
    dim totalt as double = termino * 12
    dim payment as double = Pmt (cf, totali / 12, totalt)
    dim totalz as String = str((payment), "$###,##0.00")

    TextField16.text = totalz

  5. Michel B

    May 18 Pre-Release Testers, Xojo Pro
    Edited 5 months ago by Michel B

    @Ivan O I have this code in the Textfield2.text

    Which event ?

    By the way, when you post code, please select it and click the code icon -image- above the editor.

    It will make it much more legible.

  6. Tim P

    May 18 Pre-Release Testers, Xojo Pro

    Holy cow you should name your controls.

  7. The event is Textchange

  8. Michel B

    May 18 Pre-Release Testers, Xojo Pro Answer

    If in TextField2 TextChange event you place :

    TextField34.Text = me.Text TextField34.Invalidate

    It should work right away.

  9. Work great. Thanks Michel.

or Sign Up to reply!