Board index » cppbuilder » How to Gray out the CheckBox?

How to Gray out the CheckBox?

Hello,
In my program it starts off with the checkbox being check thought the Object
inspector. When the user clicks on another checkbox, the first checkbox
should be grayed out and not be able to be checked agian. This is what I've
done but it only it grayed out when I reckeck the box which I don't want.

AutoDetectChk->State = cbUnchecked;
AutoDetectChk->AllowGrayed = true;

Thanks
Clinton

 

Re:How to Gray out the CheckBox?


Use TCheckBox::Enabled to control whether the control is grayed.  

The AllowGrayed setting doesn't allow the control to LOOK grayed, it
allows the Check property to return the value cbGrayed.

-chad

Quote
Clinton Langan wrote:

> Hello,
> In my program it starts off with the checkbox being check thought the Object
> inspector. When the user clicks on another checkbox, the first checkbox
> should be grayed out and not be able to be checked agian. This is what I've
> done but it only it grayed out when I reckeck the box which I don't want.

> AutoDetectChk->State = cbUnchecked;
> AutoDetectChk->AllowGrayed = true;

> Thanks
> Clinton

Re:How to Gray out the CheckBox?


On Mon, 20 Sep 1999 16:17:58 -0500, "Clinton Langan"

Quote
<clan...@sprint.ca> wrote:

AutoChkDetect->Enabled = false;

grays it out and makes it non-selectable...

- Jorgen

Other Threads