Solved

Listbox style setting

Posted on 2001-08-22
10
331 Views
Last Modified: 2008-03-10
Normal checkbox control has a value property and we can set to 2 for dimmed appearance. The listbox control has a style property and we can set to 1 to have a checkbox associated with each item. But this time we can only check and uncheck.

Is there any way we can also make this checkbox (associated with listbox control) to dim. I really need to capture 3 values whether the item is 1) checked 2)not-checked or 3)not applicable (by dim)

Could any one help me.

Thanks in advance
0
Comment
Question by:afsary082101
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 14

Expert Comment

by:wsh2
ID: 6416037
Rather than use the

Check1.Value = 2

property (Dimmed).. try using

Check1.Enabled = False

instead.. <smile>.
0
 

Author Comment

by:afsary082101
ID: 6416045
I am sorry, I actually wanted to mean grayed rather than dimmed.
0
 
LVL 14

Expert Comment

by:wsh2
ID: 6416062
I understood what you meant.. the intent of grayed / dimmed is to preclude the user from clicking on a meaningless item. My thought was that the Enabled property MIGHT work instead.

To be honest.. the more I think about this.. i am unclear on what you are trying to do. Could you possibly elaborate as to why you want to have the "greyed" setting?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:afsary082101
ID: 6416075
Actually I can not disable any item is a list box (can I). What I want to do is - user has three choice in a list of check items. They can say completed (ticked), Not completed (clear or unticked) and not applicable (gray)
0
 
LVL 14

Expert Comment

by:wsh2
ID: 6416104
OMG.. my apologies.. you want to use the Listbox. Will check it out in the morning.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6416387
Tree choices...i think you are using the wrong control.
0
 
LVL 6

Accepted Solution

by:
andyclap earned 45 total points
ID: 6417133
Unfortunately the listbox's checkbox only supports two states.
You could fake a tri-state checkbox using images (perhaps on a subitem in report mode) and some click-handling, or using an ownerdraw listbox (but this is very complicated).
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6420013
As i said, wrong control.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6421748
Did i miss something?
0
 
LVL 6

Expert Comment

by:andyclap
ID: 6422235
Not sure why I got the points, I suppose a B was appropriate here.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

734 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