Solved

gray out item in listbox

Posted on 1998-01-02
3
311 Views
Last Modified: 2013-11-20
I want to gray an item of a list box. Is this possible?
0
Comment
Question by:marcw
3 Comments
 
LVL 1

Expert Comment

by:Arkadiy
ID: 1313394
Short answer is: NO. You can use 3-rd party gadgets, list control(a new thing for Win95) or implement owner-drawn list box. All these solutions are a bit clumsy, but will do the trick.
0
 
LVL 3

Expert Comment

by:shaig
ID: 1313395
The way i found for dealing with this issue is to display a grayed
bitmap for the grayed item's.
This will work for a list-control  ( i don't know if a list-box can show bitmaps ), the list-control also has the capability of owner-drawing, maybe this can help you.
0
 
LVL 7

Accepted Solution

by:
galkin earned 100 total points
ID: 1313396
Yes you must create owner draw list box and perform custom drawing. Use GrayString to draw list box item gray text or use GetSysColor(COLOR_GRAYTEXT) to get gray text color, call SetTextColor() and then draw text using usual GDI  function DrawText or (Ext)TextOut.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now