There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer bios black screen blue screen boot computer connection crash css dell display driver drivers email error excel firefox firefox 3 hard drive internet internet explorer itunes laptop malware monitor network networking nvidia outlook outlook 2003 outlook express password printer problem problems router security slow software sound sprtcmd.exe startup trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
(solved) VB listbox


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
lamstaldy's Avatar
Senior Member with 113 posts.
 
Join Date: Dec 2001
Location: Plymouth, Mass.
18-Dec-2003, 03:25 PM #1
VB listbox
Why can't I use the Click event of a list box to hide the list?

PHP Code:
         Private Sub List1_Click()
             
List1.Visible False
         End Sub 
This doesn't hide the listbox, it just highlights the row that is clicked on.
MustBNuts's Avatar
Senior Member with 1,930 posts.
 
Join Date: Aug 2003
Location: Nevada
18-Dec-2003, 03:46 PM #2
I guess it must depend on what else is going on for that list box. I just tried that on an existing application I have, and it worked fine; the minute I clicked on an item in the list, the entire box disappeared.

My listbox loads on selecting an option from a dropdown, but once loaded, nothing else happens.

If it does some other processing, maybe put that code (list1.visible=false) at the end of the sub/function that is doing the processing....

Hope this helps.

MBN
__________________
I'll burn that bridge when I get to it!
lamstaldy's Avatar
Senior Member with 113 posts.
 
Join Date: Dec 2001
Location: Plymouth, Mass.
18-Dec-2003, 05:40 PM #3
Thanks MBN. I found my problem. I was clicking on an empty space at the bottom of the list. When I clicked on an item it worked fine.
MustBNuts's Avatar
Senior Member with 1,930 posts.
 
Join Date: Aug 2003
Location: Nevada
18-Dec-2003, 05:48 PM #4
If you need it to disappear when you click anywhere, you might want to try changing it from a click event to a gotfocus event. that way it won't matter what you click on, as long is it got clicked anywhere it will disappear.

MBN
lamstaldy's Avatar
Senior Member with 113 posts.
 
Join Date: Dec 2001
Location: Plymouth, Mass.
18-Dec-2003, 07:08 PM #5
Great idea, I don't know why I didn't think of it
Thanks again MBN.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:14 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.