Hardkeys and tables

Discussion in 'Questions (Windows Mobile)' started by markbarrett_1, Nov 10, 2008.

  1. markbarrett_1

    markbarrett_1 Member Licensed User

    Hi,

    Is there a way of just trapping the KeyEnter hardware event so I can take some action on that, but pass all the other hardware events to the underlying control (in this case a table) so the wheel thing on my phone still scrolls through a table listing, but when I hit the Key Enter it does something. As soon as I define a hardware event for the form I loose normal event processing for the table object.

    Alternatively is there a method I can call to move the current highlighted field up or down on the table control under my program control?

    Thanks.

    Cheers.

    M
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Yes, with Table.SelectCell.
    Code:
    Sub btnUp_Click
        table1.SelectCell(table1.SelectedCol,
    Max(0,table1.SelectedRow-1))
    End Sub

    Sub btnDown_Click
        table1.SelectCell(table1.SelectedCol,
    Min(table1.RowCount-1,table1.SelectedRow+1))
    End Sub
     
  3. markbarrett_1

    markbarrett_1 Member Licensed User

    Hi Erel,

    Just a quick word to say work perfectly and thanks for the suggestion.

    For others I have found that if you want the scroll button to work as soon as the form is displayed (trying to make the user interface "tight") you need to ensure the control has focus set on showing the form. I have 3 pda's that I test on and the behaviour of all three was different until I set the control to have focus explicitly.

    Thanks.

    Cheers.

    M
     
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