Addevent Table

Discussion in 'Questions (Windows Mobile)' started by tvrman, Sep 29, 2007.

  1. tvrman

    tvrman Member Licensed User

    Hi Guys,

    Could someone give me an example of the Addevent in combination
    with the table?,

    In runtime i created some tables, but i need the selection_onchanged event to, now i need to create x subs like table1_selectiononchanged(....
    I supose this can be solved at the Addevent :cool:

    Cheers
     
  2. Cableguy

    Cableguy Expert Licensed User

    Assuming that what you ment was "selection changed" and not "selection on changed," It should be something like:

    AddEvent ("Table1", selectionchanged, "Table1_selectionchanged")
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Code:
    Sub App_Start
        Form1.Show
        AddTable(
    "form1","t2",20,30,100,100)
        t2.AddCol(cstring,
    "c1",50)
        t2.addrow(
    23)
        t2.addrow(
    24)
        AddEvent(
    "t2",SelectionChanged,"TablesEvent")
        
    End Sub


    Sub TablesEvent (ColName, Row)
        form1.Text = t2.Cell(colname,row)
    End Sub
    Note that it is not required to always use AddEvent.
    You could just write:
    Code:
    Sub t2_SelectionChanged (ColName,Row)
    There is a new tutorial that covers these issues: http://www.basic4ppc.com/forum/showthread.php?t=907
     
  4. tvrman

    tvrman Member Licensed User

    May i see again thank you !

    :sign0188:
     
Loading...