Solved

Listbox style setting

Posted on 2001-08-22
10
318 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

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!

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

726 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