Listbox event
Listbox event
Listbox event
Listbox event
Listbox event
Listbox event Listbox event Listbox event Listbox event Listbox event Listbox event Listbox event Listbox event
Listbox event Listbox event
Listbox event
Go Back  Xtreme Visual Basic Talk > > > Listbox event


Reply
 
Thread Tools Display Modes
  #1  
Old 01-06-2011, 04:18 PM
brandonvmoore brandonvmoore is offline
Newcomer
 
Join Date: Jan 2011
Posts: 1
Default Listbox event


Edit by Moderator: Re: ListBox Event
I'm finding myself in need of the same event.

The scrollbar that comes with the ListBox is too small for touch screens, so I use my own scrollbar instead. But when you do this on various forms you end up repeating a lot of code.

So my solution was to create a custom scollbar that has a property I can set to the control I want it to be a scrollbar for. In vb6, I can use the withevents keyword to get access to the control's events so that all the scrollbar related code can be in the custom scrollbar object I created, except...

I had to create a refresh method for the consuming code to use to let the scrollbar know when the number of items changes. The scrollbar doesn't need to be told how many items there are because it has access to the control, but for a listbox there is no event to tie into when an item is added/removed so not 100% of the scrollbar related code could be encapsulated
Edit by Moderator: Please do not reply to threads more than 30 days old, as they are considered archive only. I've added a link to the original thread for you. Thanks, and welcome to the forum

Last edited by Cerian Knight; 01-06-2011 at 10:00 PM.
Reply With Quote
  #2  
Old 01-13-2011, 03:24 PM
Frog's Avatar
Frog Frog is offline
Freshman
 
Join Date: Aug 2003
Location: Australia
Posts: 47
Default

Reply With Quote
  #3  
Old 01-13-2011, 06:55 PM
Frog's Avatar
Frog Frog is offline
Freshman
 
Join Date: Aug 2003
Location: Australia
Posts: 47
Default

After further thought I came up with this
Attached Files
File Type: zip Listy.zip (64.6 KB, 3 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Listbox event
Listbox event
Listbox event Listbox event
Listbox event
Listbox event
Listbox event Listbox event Listbox event Listbox event Listbox event Listbox event Listbox event
Listbox event
Listbox event
 
Listbox event
Listbox event
 
-->