Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 10,802 of 10,840    |
|    Raoul Watson to Mojo    |
|    Re: Using VB6 Listview to rename files i    |
|    15 Sep 09 02:09:00    |
      XPost: comp.lang.basic.visual.misc       From: WatsonR@IntelligenCIA.com              Mojo wrote:       > Hi All       >       > Hope everybody is well.       >       > Wondered if you could help. I'm currently using a listview to show the       > backup files that the user has created via my app and I've reached a problem       > where the user wants to rename the backup files from within the app rather       > than going to the directory where the backup files are kept, renaming them       > in there and then clicking the refresh button within the app - all I bit       > pants I agree.       >       > In which case I thought the best way was to use the label edit feature of       > the listview so that the user can change the backup name with the program       > and then all is rosey... err.. no.       >       > It's probably me, but it seems to be fraught with problems. For example,       > when they change the name in the label how do I rename the backup file in       > the directory?? I don't know the original name!!       >       > Also what if they change the file name to nothing or the same as something       > else... arrrrggghhh.       >       > Has anybody managed to overcome this potential nightmare??       >       > Thanks for any advice you can give.       >       >       >       You should be able to make use of the before and after label edit (i.e.       get the original name in the before edit and get the new string in the       after edit)              Private Sub ListView1_BeforeLabelEdit(cancel As Integer)       old_filename = ListView1.SelectedItem       End Sub              Private Sub ListView1_AfterLabelEdit(cancel As Integer, NewString As String)       renamed_filename = NewString       End Sub              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca