Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Listbox style setting

Posted on 2001-08-22
10
Medium Priority
?
347 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
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 135 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Suggested Courses

972 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