ListBox with Grayed Out / Non-Selectable Items

This code sample shows how to create a listbox in VB5/6 which is subclassed to have non-selectable/grayed out items.

provided by: 
Originally published at Internet.com


Author: Ravi Kiran

If you ever wanted a listbox With a few non-seletable items?
Here Is some code that does this.

Screen Shot

This Is still under development.. Only Ver 1.0 Is ready. More To come..

To test this: Take a test project. Add a module And a form. Copy the following code And run.

SAVE before RUNNING, please..

In this test, i am rejecting selection of every 3rd Item. This Is based On index. Another way would be To reject based On Listitem (String): The usual technique Is To have a String starting With "!*..." Or something Like that, And look For that identification In the selected Item. I will Put that also up In near future ( i.e when ever i Get Time:-) )

Any suggestions most welcome.

Ravi Kiran

Put this code In a module (mLBSbCls.Bas)

' Listbox Subclassing: Ported the C code found on MSDN at ' SDK Documentation/PlatformSDK/User Interace services/controls/listbox ' and Knowledgebase Article ID: Q74792 ' ' By T. Ravi Kiran. ' E-Mail: t_ravi_kira

Read article at Internet.com site
Related Articles
- Custom MSBuild Task Development with Visual C++
Visual C++ 2010 sees the integration of MSBuild with Visual C++. MSBuild is Microsoft's common build engine and one of its key design goals is the ability to support a high-degree of flexibility in customizing the build process. See how a custom MSBuild task can be built in Visual C++, and how the task can be used to customize the build process of other Visual C++ 2010 projects.
- Object-Oriented Application Development Using the Caché Postrelational Database
Regional Articles
- ListBox with Grayed Out / Non-Selectable Items Alabama
- ListBox with Grayed Out / Non-Selectable Items Alaska
- ListBox with Grayed Out / Non-Selectable Items Arizona
- ListBox with Grayed Out / Non-Selectable Items Arkansas
- ListBox with Grayed Out / Non-Selectable Items California
- ListBox with Grayed Out / Non-Selectable Items Colorado
- ListBox with Grayed Out / Non-Selectable Items Connecticut
- ListBox with Grayed Out / Non-Selectable Items DC
- ListBox with Grayed Out / Non-Selectable Items Delaware
- ListBox with Grayed Out / Non-Selectable Items Florida
- ListBox with Grayed Out / Non-Selectable Items Georgia
- ListBox with Grayed Out / Non-Selectable Items Hawaii
- ListBox with Grayed Out / Non-Selectable Items Idaho
- ListBox with Grayed Out / Non-Selectable Items Illinois
- ListBox with Grayed Out / Non-Selectable Items Indiana
- ListBox with Grayed Out / Non-Selectable Items Iowa
- ListBox with Grayed Out / Non-Selectable Items Kansas
- ListBox with Grayed Out / Non-Selectable Items Kentucky
- ListBox with Grayed Out / Non-Selectable Items Louisiana
- ListBox with Grayed Out / Non-Selectable Items Maine
- ListBox with Grayed Out / Non-Selectable Items Maryland
- ListBox with Grayed Out / Non-Selectable Items Massachusetts
- ListBox with Grayed Out / Non-Selectable Items Michigan
- ListBox with Grayed Out / Non-Selectable Items Minnesota
- ListBox with Grayed Out / Non-Selectable Items Mississippi
- ListBox with Grayed Out / Non-Selectable Items Missouri
- ListBox with Grayed Out / Non-Selectable Items Montana
- ListBox with Grayed Out / Non-Selectable Items Nebraska
- ListBox with Grayed Out / Non-Selectable Items Nevada
- ListBox with Grayed Out / Non-Selectable Items New Hampshire
- ListBox with Grayed Out / Non-Selectable Items New Jersey
- ListBox with Grayed Out / Non-Selectable Items New Mexico
- ListBox with Grayed Out / Non-Selectable Items New York
- ListBox with Grayed Out / Non-Selectable Items North Carolina
- ListBox with Grayed Out / Non-Selectable Items North Dakota
- ListBox with Grayed Out / Non-Selectable Items Ohio
- ListBox with Grayed Out / Non-Selectable Items Oklahoma
- ListBox with Grayed Out / Non-Selectable Items Oregon
- ListBox with Grayed Out / Non-Selectable Items Pennsylvania
- ListBox with Grayed Out / Non-Selectable Items Rhode Island
- ListBox with Grayed Out / Non-Selectable Items South Carolina
- ListBox with Grayed Out / Non-Selectable Items South Dakota
- ListBox with Grayed Out / Non-Selectable Items Tennessee
- ListBox with Grayed Out / Non-Selectable Items Texas
- ListBox with Grayed Out / Non-Selectable Items Utah
- ListBox with Grayed Out / Non-Selectable Items Vermont
- ListBox with Grayed Out / Non-Selectable Items Virginia
- ListBox with Grayed Out / Non-Selectable Items Washington
- ListBox with Grayed Out / Non-Selectable Items West Virginia
- ListBox with Grayed Out / Non-Selectable Items Wisconsin
- ListBox with Grayed Out / Non-Selectable Items Wyoming
Related Articles
- Custom MSBuild Task Development with Visual C++
Visual C++ 2010 sees the integration of MSBuild with Visual C++. MSBuild is Microsoft's common build engine and one of its key design goals is the ability to support a high-degree of flexibility in customizing the build process. See how a custom MSBuild task can be built in Visual C++, and how the task can be used to customize the build process of other Visual C++ 2010 projects.
- Object-Oriented Application Development Using the Caché Postrelational Database

Rss   Delicious   Digg   Add To My Yahoo   Add To My Google   Bookmark   Search Plugin

Topics:
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML