Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   VCL TCheckListBox -> FMX ????? (https://www.delphipraxis.net/197204-vcl-tchecklistbox-fmx.html)

Schokohase 23. Nov 2018 19:07

AW: VCL TCheckListBox -> FMX ?????
 
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;

bernhard_LA 24. Nov 2018 11:42

AW: VCL TCheckListBox -> FMX ?????
 
sieht schon mal gut aus :-D, der Class Helper Ansatz kompiliert und ich kann die Komponente Installieren.


In der VCL Variante gab eine funktion um auf einen Tastendruck zu reagieren


Delphi-Quellcode:
procedure TCheckListBoxEXT.KeyPress( var Key : Char );
  var
    Shift : TShiftState;
    Matchpattern : String;
  begin
    if Key = ^A
    then
      begin
        checkall;
        Key := #0;
      end;

    if Key = ^U
    then
      begin
        uncheckall;
        Key := #0;
      end;
     ....

Wie lautet hier die entsprechende FMX Variante ?


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:37 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz