how to make the checkbox read only

  • Thread starter Thread starter Jassim Rahma
  • Start date Start date
J

Jassim Rahma

how can I make the check box control read only?

when I tried the enabled = false it changed the control color yo gray which
i don't like..
 
You want it for status display?

You could handle the click event for the control. You would just not allow
any changes to occur.
 
Jassim,

You are asking the wrong question. You have found the way to make it
read only, you just don't like the color.

What you should have asked is how can you make it read only without
disabling it? Personally, I think that you should allow the textbox to be
greyed out, since I would think a user would want some visual indication
that they can't access the checkbox.

In order to make it so that it is not disabled, you could look into just
not accepting a click, by handling the BM_SETCHECK message so that it does
nothing.

Your other option would be to disable the control, and custom paint it
in the disabled state, so that it appears enabled.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top