Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editbox 1

Status
Not open for further replies.

redGSRguy

Programmer
Sep 16, 2005
12
US
Hi guys I am using a tab page with a number of pages. On the first page I have a TCheckBox which if this one is checked TCheckBox on page two is also checked. The box on the 2nd page is being used as a sort of status update so you can fill out options on the next page.

However, the checkbox on the second page is still clickable. Is there anyway I can lock the output in a way similar to the ReadOnly in TEdit boxes.

One way I thought of is if they click the box just check it it is true and if so keep it at true. Is there a better way?
 
Either that or disable the second check box. Your choice.

James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Is there a way to disable it without greying it out?
 
I suppose so but I've never had a reason not to have it grayed out since I believe this is a function of Windows. I suppose that on the second check box's OnCheck event you could see if the first check box is checked then reset the second box's checked method to true (or false depending on your needs).

This would mean the second box is still clickable but it would always default to whatever the first check box says it should be.

There is a AllowGrayed property for check boxes but I've never used it. Look in your help file for TCheckBox properties State and AllowGrayed.

James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Thanks for your advice I managed to use what you said with the OnClick event, the way I was trying it was trying to check if itself was checked and that was messing things up. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top