Solved

gray out item in listbox

Posted on 1998-01-02
3
317 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASCII Non-Printable characters/codes and their HTML equivalents 6 117
Shell script to login to remote m/c and execute commands 10 78
tripleUp challenge 7 79
Not needed 13 113
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

832 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