Solved

Listbox style setting

Posted on 2001-08-22
10
288 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

862 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

23 Experts available now in Live!

Get 1:1 Help Now