Problem with "next" menu.

kyto

Member
Licensed User
Longtime User
Hello!
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).

Sub mnuNext_Click
row1 = (Table1.SelectedRow+1) Mod table1.RowCount
ShowRow
End Sub

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

Thanks!
 

Attachments

  • PID.zip
    1.4 KB · Views: 192

dzt

Active Member
Licensed User
Hi,

If I correctly understand do the following:

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

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

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

Table1_SelectionChanged (ColName, Row) event
 

alfcen

Well-Known Member
Licensed User
Longtime 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

Saludos
Robert
 

kyto

Member
Licensed User
Longtime User
Thanks!

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.
 

alfcen

Well-Known Member
Licensed User
Longtime 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.

Cheers
Robert (alfcen)
 

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
 

alfcen

Well-Known Member
Licensed User
Longtime 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:

http://www.alfcen.com/pocket/

I would highly value your opinion.

Cheers
Robert
 

Attachments

  • Lab.sbp
    5.5 KB · Views: 203

kyto

Member
Licensed User
Longtime User
Thanks ! (Again)

Hello!

Dimitris: Thanks!:)
Robert:
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.

Saludos!
 
Top