|
-
Oct 1st, 2005, 10:46 AM
#1
Thread Starter
New Member
[RESOLVED] DirList - select option
Hi
I have a wee app that has a DirList box, a command button and a ListView - basically I select a folder click the button and it's added to a list. This works ok but I'm trying to get a way to have the folder selected without having to open it in the Dirlist (ie it's selected if highlighted) - not sure if it's possible or not.
Cheers in advance
Neil
Last edited by the_jinj; Oct 3rd, 2005 at 04:26 AM.
-
Oct 1st, 2005, 01:28 PM
#2
Re: DirList - select option
You can add anything you want to a listbox, it doesn't have to be loaded from a DirList. Just use something like this:
-
Oct 2nd, 2005, 06:38 AM
#3
Thread Starter
New Member
Re: DirList - select option
Sorry maybe I never explained clearly...I want to be able to know what folder the user has clicked on even if it's just highlighted in the DirList box - at the moment it has to be double clicked to open it before it registers what directory was selected.
-
Oct 3rd, 2005, 04:08 AM
#4
Re: DirList - select option
VB Code:
Private Sub Command1_Click()
With Dir1
Text1.Text = .List(.ListIndex)
End With
End Sub
This world is not my home. I'm just passing through.
-
Oct 3rd, 2005, 04:19 AM
#5
Re: DirList - select option
 Originally Posted by the_jinj
able to know what folder the user has clicked on even if it's just highlighted in the DirList box
Extending trisuglow's example in the Click event (works):
VB Code:
Option Explicit
Private Sub Dir1_Click()
Me.Caption = Dir1.List(Dir1.ListIndex)
End Sub
-
Oct 3rd, 2005, 04:25 AM
#6
Thread Starter
New Member
Re: DirList - select option
 Originally Posted by trisuglow
VB Code:
Private Sub Command1_Click()
With Dir1
Text1.Text = .List(.ListIndex)
End With
End Sub
That worked perfectly - thanks !
-
Oct 3rd, 2005, 04:27 AM
#7
Thread Starter
New Member
Re: DirList - select option
 Originally Posted by Bruce Fox
Extending trisuglow's example in the Click event (works):
VB Code:
Option Explicit
Private Sub Dir1_Click()
Me.Caption = Dir1.List(Dir1.ListIndex)
End Sub
That works too...thanks
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
|