Einzelnen Beitrag anzeigen

Schokohase
(Gast)

n/a Beiträge
 
#11

AW: VCL TCheckListBox -> FMX ?????

  Alt 23. Nov 2018, 19:07
Also suchst do so etwas?
Delphi-Quellcode:
type
  TListBoxHelper = class helper for TListBox
  private
    function GetChecked(Index: Integer): Boolean;
    procedure SetChecked(Index: Integer; const Value: Boolean);
  public
    property Checked[Index: Integer]: Boolean read GetChecked write SetChecked;
  end;

  { TListBoxHelper }

function TListBoxHelper.GetChecked(Index: Integer): Boolean;
begin
  Result := Self.ItemByIndex(Index).IsChecked;
end;

procedure TListBoxHelper.SetChecked(Index: Integer; const Value: Boolean);
begin
  Self.ItemByIndex(Index).IsChecked := Value;
end;
  Mit Zitat antworten Zitat