473,406 Members | 2,705 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,406 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 1241

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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.