Solved

Listbox style setting

Posted on 2001-08-22
10
275 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
 

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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…

744 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

14 Experts available now in Live!

Get 1:1 Help Now