mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 12:08:09 +02:00
LCL: New procedure Exchange for TCheckListBox. Issue #34793, patch from AlexeyT.
git-svn-id: trunk@59972 -
This commit is contained in:
parent
6bedb95bcd
commit
e3f4661f92
@ -68,7 +68,8 @@ type
|
||||
procedure MeasureItem(Index: Integer; var TheHeight: Integer); override;
|
||||
procedure Toggle(AIndex: Integer);
|
||||
procedure CheckAll(AState: TCheckBoxState; aAllowGrayed: Boolean = True; aAllowDisabled: Boolean = True);
|
||||
|
||||
procedure Exchange(AIndex1, AIndex2: Integer);
|
||||
|
||||
property AllowGrayed: Boolean read FAllowGrayed write FAllowGrayed default False;
|
||||
property Checked[AIndex: Integer]: Boolean read GetChecked write SetChecked;
|
||||
property Header[AIndex: Integer]: Boolean read GetHeader write SetHeader;
|
||||
@ -243,6 +244,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomCheckListBox.Exchange(AIndex1, AIndex2: Integer);
|
||||
var
|
||||
Value: TCheckBoxState;
|
||||
begin
|
||||
Value := State[AIndex1];
|
||||
State[AIndex1] := State[AIndex2];
|
||||
State[AIndex2] := Value;
|
||||
Items.Exchange(AIndex1, AIndex2);
|
||||
end;
|
||||
|
||||
procedure TCustomCheckListBox.DoChange(var Msg: TLMessage);
|
||||
begin
|
||||
//DebugLn(['TCustomCheckListBox.DoChange ',DbgSName(Self),' ',Msg.WParam]);
|
||||
|
Loading…
Reference in New Issue
Block a user