Problem with "next" menu.

Discussion in 'Questions (Windows Mobile)' started by kyto, Sep 25, 2007.

  1. kyto

    kyto Member Licensed User

    I try to add next/previous menu to my application(with a CSV database), it works only if I select a row or a cell, (it advances only a row).

    There exists the way of which it continues with the next row without having to select again a cell?


    Attached Files:

      File size:
      1.4 KB
  2. dzt

    dzt Active Member Licensed User


    If I correctly understand do the following:

    table1.SelectCell(table1.SelectedCol, table1.SelectedRow+1)

    table1.SelectCell(table1.SelectedCol, table1.SelectedRow-1)

    ...and to fill textboxes you need only to catch

    Table1_SelectionChanged (ColName, Row) event
  3. alfcen

    alfcen Well-Known Member Licensed User

    Hola kyto
    I have good experience with this:

    Sub Globals
    Dim current_row
    End Sub

    Sub mnuPrev_Click
    current_row= (current_row+table1.RowCount-1) Mod table1.RowCount
    End Sub

    Sub mnuNext_Click
    current_row= (current_row+1) Mod table1.RowCount
    End Sub

  4. kyto

    kyto Member Licensed User


    Thanks for their responses.

    dzt: I tried your response and until now it has worked, I had problem with the last row, but I believe that it already should solve it.

    alfcen: I could not have achieved that your suggestion works, but I will keep on trying, since it is interesting to me to understand the solution.
    Would be grateful to you enormously if you could post a small example. (I’m Sorry, but still I complicate some simple things)

    Again, thank you very much.
  5. alfcen

    alfcen Well-Known Member Licensed User

    Hola Kyto

    Well, you made it. Prev and Next are working like a charm.
    There were a few syntax errors and incomplete routines.

    I have added more functions to your application:

    1. Add new records
    2. Delete records
    3. Save a backup database CSV
    4. Table sorting
    5. 3D buttons
    6. Record position indicator
    7. Form re-design (matter of taste)
    8. Code optimization
    9. Tab order for data input established
    10. Program icon added
    11. Controls optimized for desktop and device

    Definitely still imperfect but I hope this helps.

    Robert (alfcen)
  6. dzt

    dzt Active Member Licensed User

    Hello Robert,

    Excellent design!
    I wish I could see through your eyes...

    But you still need something to always show the selected row:
    table1.SelectCell(table1.SelectedCol, cur_row)

    See you
  7. alfcen

    alfcen Well-Known Member Licensed User

    Hello Dimitris,
    Thanks so much for the additional nice flavor!
    Unfortunately, there is no FullRowSelect for Tables.

    The modified source is attached hereto.

    Senor kyto: update the source, por favor :)

    The eyes of dzt are looking much deeper into B4PPC :sign0162:

    If it is not too much trouble, please have a look at my suite of B4PPC applications hosted on:

    I would highly value your opinion.


    Attached Files:

    • Lab.sbp
      File size:
      5.5 KB
  8. kyto

    kyto Member Licensed User

    Thanks ! (Again)


    Dimitris: Thanks!:)
    The modifications that you did to the code helped me enough, I have understood much better some things, I will keep on working in, and I hope to keep on being provided with his help if I have problems.

    I have seen some of your applications (Wow) :sign0098:they seem to me quite interesting, which more I have explored up to today, it is Tonight's Sky (many years ago i was looking for something similar and I did not find anything interesting).
    These applications seem to me of excellent quality, and also they demonstrate the big projects that can be obtained, congratulations.