winzip icon

Listbox class ==> hot-tracking effect => horizontal scrollbars => add header => seperate tooltip fo

Email
Submitted on: 2/10/2015 5:09:00 PM
By: Evan Toder (from psc cd)  
Level: Intermediate
User Rating: By 12 Users
Compatibility: VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 1310
 
     This is a listbox class that adds several great features to the standard listbox. (1) function draw_header:=This function draws an attractive header at the top of your listbox so it looks more like a listview control. The string you provide should be the text you want for your header, seperated by pipe ""|"" characters. The [container] parameter is the object the listbox is drawn on..ie the form or frame or picturebox (2) sub additems_with_tabs:="This sub allows you to additems to the listbox in such a manner that string ""string|string2|string3"" takes the pipe character and converts it to tabs" (3) sub horiz_scrollbars:="Allows you to add horizontal scrollbars to the listbox. If [scroll_width] is not supplied then the items in the list are scanned and if horizontal scrollbars are required, then it is added, making the listbox wide enouph to view the widest list entry. If [scroll_width] is supplied then you are manually adding them, the width based upon the value you supply for [scroll_width]." (4) function search:="Allows you to search for an item in the listbox. This acts like the autocomplete feature of browsers in that the search is case insensitive, and a partial match returns the index of the first listitem matching so a search of ""VIS"", for example, will return the index of ""visual basic"" entry in the listbox." (5)initialize_listbox:= "This must be the first method called and it sets reference to the listbox you will be referring to in this class." (6) sub hot_tracking (this one is real cool) "Calling this sub and setting [benable] to True makes your listbox have a ""hot-tracking"" effect in that moving your mouse over the listbox causes the item under your mouse to be hilighted" (7) sub individual_item_tooltips:="The tooltip for the listbox displays the contents of the listitem the mouse is over. Useful if the contents of listitems width exceed the width of the listbox itself" (8) sub tabstops:="Set tabstop points for the listbox. Specify in pixels..a value for each succeeding column" (9) sub add_many_items:="Enables you to add multiple items with one call. Each item to add is seperated by a comma."

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com


Other 29 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.