473,386 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Different Colors in List Boxes...?

I'd like to affect specific items in a List Box. In other words, I'd like to take any one (or more) elements of the List Box Collection and, say, turn it red, or turn it bold.

Anybody know how to do this?

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Nov 22 '05 #1
1 1240

Take a look at the DrawMode and ItemHeight properties along with the
DrawItem event. One way is to set the DrawMode to OwnerDrawFixed then set
the ItemHeight property to the height in pixels of each row. In the
DrawItem event you do all of your custom painting on the provided Graphics
object.

Robby

"M Sutherland" <ta******@hotmail.com> wrote in message
news:ON**************@TK2MSFTNGP12.phx.gbl...
I'd like to affect specific items in a List Box. In other words, I'd like
to take any one (or more) elements of the List Box Collection and, say,
turn it red, or turn it bold.

Anybody know how to do this?

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &
ASP.NET resources...

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: aznFETISH | last post by:
I have a list of links that I ue on my page, I alternate background colors for these links in a table, I usually do it using a DB but this list of link is manually added into the page so my...
1
by: tantiboh | last post by:
I'd like to affect specific items in a List Box. In other words, I'd like to take any one (or more) elements of the List Box Collection and, say, turn it red, or turn it bold. Anybody know how to...
3
by: Marco Simone | last post by:
Hi, I have form with few rows of text boxes and labels. I tried to change colors of labels, when txtBox gets focus, with code. Private Sub txtBox1Row1_GotFocus() Me!lblData1.BackColor =...
1
by: news.microsoft.com | last post by:
When I add to a listview, can the text I have be of different colors? For example, I want to add these two lines to my list view: "This is my program" "This is my other program" Can I add...
2
by: tantiboh | last post by:
I'd like to affect specific items in a List Box. In other words, I'd like to take any one (or more) elements of the List Box Collection and, say, turn it red, or turn it bold. Anybody know how to...
3
by: tantiboh | last post by:
I'd like to affect specific items in a List Box. In other words, I'd like to take any one (or more) elements of the List Box Collection and, say, turn it red, or turn it bold. Anybody know how to...
12
by: Adam Hartshorne | last post by:
Hi All, I was wondering if somebody could post a few lines of code which would produce random colors, which will be used in defining different regions on a mesh. So in addition to having n...
4
by: ApexData | last post by:
In a Continuous form, I want to use Conditional Formatting to change the background color of a date field based on a condition. 1-The color chart in the CF menu option offers limited colors. How...
2
by: aldeb | last post by:
My dilemma is as follows. I have a continous form that I am using as a Visual Display Form to show the status of records (SoeCodes). What their status currently is and what they have been. I have 6...
3
by: evenlater | last post by:
Using Access 2007, I've found that combo box back colors change to transparent from normal inconsistently for no reason I can discern. Never had that problem in previous versions of Access. I do...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.