checkbox control look like button

C

cj

How can I make a checkbox control look like a button with a check in it?
I need to figure out the border color etc to make it look like a button.
 
Z

zacks

How can I make a checkbox control look like a button with a check in it?
I need to figure out the border color etc to make it look like a button.

Use two controls on top of each other, a checkbox and a button. Make
the button not visible by default. In the checkbox's checkchanged
event handler, if the checkbox is checked, make it invisible, and make
the button visible.

Only problem is there would be no way to un-check it, unless you
handled that somehow in the button's click event.
 
Z

zacks

Use two controls on top of each other, a checkbox and a button. Make
the button not visible by default. In the checkbox's checkchanged
event handler, if the checkbox is checked, make it invisible, and make
the button visible.

Only problem is there would be no way to un-check it, unless you
handled that somehow in the button's click event.

Boy, I totally misread your question. Not sure if you can do that. You
could use a Button control and have two images, one that looks like a
checked checkbox, and one that looks like a un-checked checkbox. And
in the button's click event, change the control's image appropriately.
 

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

Top