KeyPress codes

Discussion in 'Questions (Windows Mobile)' started by pamoxi, Jan 19, 2009.

  1. pamoxi

    pamoxi Member Licensed User

    I am testing the Basic4PPC (Trial) and I am very happy with this RAD for now.

    I need make arithmetics operations on change values in TextBox, but the event KeyPress fire before that the value in the TextBox are updated.

    How I can make Calculations on change value in TextBox?

    Very Thanks.
     
    Last edited: Jan 20, 2009
  2. linum

    linum Active Member Licensed User

    Hello. You might be able to use the Door Library to trigger your event after any text change. I use it on one of my apps to filter a table based on what is being typed on a textbox and it triggers right upon typing a new letter.

    Here's the sample code from the Door library's manual:

    Code:
    Events examples:
    Handle the TextChanged 
    event (fires whenever the text changes).
    'obj is an Object, TextBox1ChangedEvent is an Event.
    Sub App_Start
        Form1.Show
        obj.New1(
    false)
        obj.FromControl(
    "textbox1")
        TextBox1ChangedEvent.New1( obj.Value,
    "TextChanged")
    End Sub


    Sub TextBox1ChangedEvent_NewEvent
        form1.Text = textbox1.Text
    End Sub

    Hope this helps you...



    linum
     
  3. pamoxi

    pamoxi Member Licensed User

    Very Thanks linum
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice