Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suggestions needed: modifying order of lines in dataset

Status
Not open for further replies.

njitter

Technical User
Sep 4, 2001
122
US
Hello,

i would like to have some suggestions on how to do this interface-wise.

I have a dataset in a text-file. It contains definitions for function keys.

I'll try to make clear what we want to do.

Old order New order
--------- ---------

1. Help 1. Help
2. Search 2. Search
3. Save 3. Save
4. Next 5. Previous
5. Previous 4. Next
6. View All 7. Add Entry
7. Add Entry 6. View All

(there are some more fields on one line but thats not important for this matter).

What would be the easiest way to change the order of the function keys?

I need a quick way to implement this, its for a one-time job only.

Regards,

Martijn

---
It's never too late to do the Right thing
 
re-create the file.

Close the dataset.
Open it then file
Pull in ALL of the data
Sort the data
Save all data back to the file, overwriting the old file.

But, it may be easier to just have the desired order stored in a constant or variable, or hard-coded, and open the file for output, and save ALL the data, overwriting the file completely.
 
CCLINT,

its not reading or writing the file that is the problem.

It's creating a simple user-interface tht allows a user to select a row and move it up or down to change the order of the keys.



---
It's never too late to do the Right thing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top