From daca93de7f7356f11ac0f2854c45bc2dd53f7681 Mon Sep 17 00:00:00 2001 From: XxXAdvisaryXxX Date: Sat, 10 Oct 2026 20:00:52 -0700 Subject: [PATCH] Implement checkbox state management methods Added methods to manage checkbox state. --- utils/forms/formutils.simba | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/utils/forms/formutils.simba b/utils/forms/formutils.simba index 4b86495f..aa6854ba 100644 --- a/utils/forms/formutils.simba +++ b/utils/forms/formutils.simba @@ -1444,6 +1444,28 @@ begin limg.Align := ELazAlign.Client; end; +procedure TLazCheckBox.SetChecked(value: Boolean); +begin + if value then + Self.State := ELazCheckBoxState.Checked + else + Self.State := ELazCheckBoxState.Unchecked; +end; + + +function TLazCheckBox.IsChecked(): Boolean; +begin + Result := Self.State = ELazCheckBoxState.Checked; +end; + + +procedure TLazCheckBox.Toggle(); +begin + case Self.State of + ELazCheckBoxState.Checked: Self.State := ELazCheckBoxState.Unchecked; + ELazCheckBoxState.Unchecked: Self.State := ELazCheckBoxState.Checked; + end; +end; function TLazStrings.Search(value: String; lo: Integer = 0): Integer; begin