|
-
Aug 2nd, 2000, 12:53 AM
#1
Thread Starter
New Member
I need a code example for this question. I have a ListView control and a text box on my form, set up like you would see in most e-mail clients with the list of messages up top and a preview pane below, and when you click on a row in the listview it shows the message in the preview pane.
If my user edits the text in the text box, I want to prompt them to save before they move to another "message". How would I write the validation code for this?
-
Aug 2nd, 2000, 01:21 AM
#2
Fanatic Member
Do you have the text stored in a text file or dynamicly in the code? If it's a text file then simply Have a msgbox pop up asking if the user wants to save. Then if vbYes is clicked then write the new info into the textfile.
Code:
Open "test.txt" For Output As #1
Print #1, Text1.Text
Close #1
Hope that somehow helps,
D!m
-
Aug 2nd, 2000, 01:26 AM
#3
Thread Starter
New Member
But when a user goes from one line to another, how do I have it run validation code for the record (line)?
-
Aug 2nd, 2000, 02:33 AM
#4
Hyperactive Member
Admittedly, I have very little experience with the ListView control, but it would make sense that you could probably put your validation code inside of the Itemchecked event. This would run when an item in the listview is selected. So all you would have to do is place the previously checked item's listindex into a global variable (or better yet, property), and then use it to run your validation code. I hope this is useful. Any other ideas?
-
Aug 2nd, 2000, 04:24 PM
#5
Thread Starter
New Member
I actually think that doing that will work, but if there are any more ideas, I would greatly appreciate them.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|