| |

VerySource

 Forgot password?
 Register
Search
View: 2887|Reply: 5

About the realization of back and forward functions

[Copy link]

4

Threads

20

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-9-28 20:00:02
| Show all posts |Read mode
There is a DirectoryListBox control and a DriveListBox control
There are 2 buttons, one is for directory forward, the other is for directory back
For example, the current directory is C:\aaaa
Go to directory F:\ppp
Press back at this time, DirectoryListBox will automatically jump back to C:\aaaa
Press forward again to jump back to F:\ppp
Hope to record about 3 changes,
For example, it is now C:\aaaa
Jump to F:\ppp
Jump to E:\ddd again
Jump to D:\eee again
If you press back, you will jump back one by one, and forward will be the opposite.

I plan to implement it with a stack, but the idea is still not clear
Hope it can help me, thanks
Reply

Use magic Report

0

Threads

22

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-9-29 11:00:01
| Show all posts
What kind of stack, just a list is over
Reply

Use magic Report

4

Threads

20

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

 Author| Post time: 2020-9-30 17:15:01
| Show all posts
Could you please give me specific ideas?
Reply

Use magic Report

4

Threads

20

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 Unknown

 Author| Post time: 2020-9-30 19:15:01
| Show all posts
Now I use the list, but I can only go back to the previous one, and the previous one will not work. Please help me heroes
Reply

Use magic Report

0

Threads

12

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-9-30 19:45:01
| Show all posts
An array records the operation steps, and the array index increases by one or decreases by one to move forward and backward.
Reply

Use magic Report

4

Threads

20

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

 Author| Post time: 2020-9-30 21:15:01
| Show all posts
I am now putting the added list item in the change event of DirectoryListBox, but the effect is not very good.After going back once, the list item changes again, and there is no index function in TStingList, so I can't return the item based on the first item. String
I'm thinking, cancel this function, it makes me have a headache
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list