0
I have a system and in a precise part only support members can deselect a checkbox.
I have tried several codes but there is always the same problem : The Checkbox by default when clicked it is marked or unchecked and I could not find a way to stop this process and only continue with the password.
Last Code I tried :
procedure TFEncerramentoPeriodo.CBFinanceiroClick(Sender: TObject);
var senha,senhad : String;
begin
senha := '328Cont';
if CBFinanceiro.Checked = true then
begin
if not(InputQuery('Digite a Senha', 'Senha', Senhad))
then
exit;
if (SenhaD=Senha) then
begin
CBFinanceiro.Checked := False;
end
else
begin
ShowMessage('Senha Incorreta! Somente Membros do Suporte Podem Desmarcar Essa Opção!');
CBFinanceiro.Checked := True;
end;
end
I searched several places and even here in the OR and I did not find anyone with the same doubt or problem or similar.
Password independent, in conventional code, how do you make the checkbox read-only?
– Bacco
enabled property....
– Marcus Melgaço
what happens is this, I want the user to be able to enable the check box, but can not disable it without first contacting the support. Because with this form it will trigger a chain reaction in other forms, changing the way they will work
– Marcus Melgaço
Well, nothing prevents enable if unchecked, and disable when checking. If successful, post as response in the field below. Remember that you can [dit] the post to improve. Learning to make a [mcve] is important too. This link can help in the best use of the site: Stack Overflow Survival Guide in English
– Bacco
Okay, I’m going to design a skim! Thanks for the tips!
– Marcus Melgaço