|
-
May 7th, 2002, 09:12 PM
#1
Thread Starter
Fanatic Member
Combobox Change Event Question
Why won't this code work? It doesn't change to the correct directory, clear the listview, & repopulate the listview on the change event. Here's my code:
VB Code:
Private Sub Combo1_Change()
File1.Path = "C:\mp3s\" & Combo1.Text
ListView1.ListItems.Clear
For X = 0 To File1.ListCount - 1
Set i = ListView1.ListItems.Add(, , File1.List(X))
i.SubItems(1) = File1.Path
DoEvents
Next
End Sub
-
May 7th, 2002, 09:22 PM
#2
Combo1 Change Event won't fire if u have selected an Item from
the drop down list...
-
May 7th, 2002, 10:05 PM
#3
Thread Starter
Fanatic Member
so how to fix?
How can I fix this then? It seems to work with a drivelistbox
-
May 7th, 2002, 10:09 PM
#4
Unfortunatly its a limitation of the ComboBox....
(I'm having the same problem - Any one know a way around it)
I'm temp using Combo_LostFocus/Validate to check for
changed data.
-
May 8th, 2002, 12:46 AM
#5
Addicted Member
COMBO BOX CHANGE EVENT
i think yu can go for the combo click event ,
change event does not work : a draw back .
well, one simple solution is that yu can check with the click event of the combo .
senthil
-
May 8th, 2002, 01:17 PM
#6
Thread Starter
Fanatic Member
Click Event Works!
I put the same code on the click event & it works fine. That is REALLY stupid though. What is the point of even having the Change event then? Oh well.
-
May 8th, 2002, 01:23 PM
#7
Frenzied Member
I always use the MS Forms Combo Box instead of the default VB combo box and I never have this problem. The MS Forms Combo Box allows you to use columns that work real nicely also. Thats why i use it.
-
May 9th, 2002, 10:24 PM
#8
New Member
combo box
"I put the same code on the click event & it works fine. That is REALLY stupid though. What is the point of even having the Change event then? Oh well."
Because change does not mean.. change as in you changed the selection, change means typing in a value as you can add items
to combo boxes. etc
Click is what you want for this, as click is "clicking" to select
another list item.
-
May 9th, 2002, 10:33 PM
#9
Addicted Member
yes in combo box, the change is not working , i dont know whether if there is any other round about way to go for change event in combo-box.
,,,,
senthil
-
May 9th, 2002, 10:59 PM
#10
I don't think there is a fault with the ListBox's Events.
You just have to use the one that best suits your requirment.
List1_Change has its place; it'll fire if the User 'changes' the Text by Typing in, or Cut n paste.
whereas, List1_Click fires when a selection has been made.
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
|