CodeSnip: Changing the Color of a List Item's Text at Run-Time with Visual Basic 2005
page 1 of 5
Published: 11 May 2007
Abstract
In this article Shaun demonstrates how to change the text color of individual items in a list box/drop down list.
by Shaun Eutsey
Feedback
Average Rating: 
Views (Total / Last 10 Days): 26064/ 60

Introduction

Today has been one of "those" days.  A co-worker asks for something that sounds easy, but in reality it becomes larger than it ever should have been.  That, my friends, is a recipe for a migraine and a learning opportunity.

The issue that was brought to me was that there are "Active" and "Inactive" items in a DropDownList that needed to be distinct within the list.  They need to be in the same list, but the inactive items need to stand out.

This started me on my fated journey.  I hit Google with a vengeance.  After all, it would be easier to find a solution from someone who has done it before than it would be to create my own, why recreate the wheel, right?

After being denied any good advice (though some of the failed examples that I ran across helped to point me in the right direction), I finally put it to myself to perform this task on my own. 

Let me start out by explaining the data that I am using.  I will be using the Territories table from the Northwood database.  I will be using the RegionID field to determine the color of the text.


View Entire Article

User Comments

Title: Thanks for the help!   
Name: mike
Date: 7/14/2009 9:07:21 AM
Comment:
Seriously saved me alot of time!
Title: Mr   
Name: Dean White
Date: 1/25/2008 4:44:26 AM
Comment:
You are a scolar and a Gentleman
Thank you.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2014 ASPAlliance.com  |  Page Processed at 11/28/2014 9:15:14 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search