Cita:
Empezado por José Luis Garcí
Vamos a ve si con un poco de código me entendéis
Normalmente haríamos
Código Delphi [-]
Var VarBElBoolean:Boolean;
begin
VarBElBoolean:=true;
if CheckBox1.checked=false then Checkbox1.checked:=true
else Checkbox1.checked:=False;
end;
end;
|
Normalmente yo haria:
Código Delphi
[-]CheckBox1.checked:=not CheckBox1.checked
No es necesario preguntar si una variable es igual a
true solo tienes que preguntar por el valor que tiene esa variable:
Código Delphi
[-]
if (variable = true)...
if (variable)...
if (variable = false)...
if not(variable)...