mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 18:08:35 +02:00
Cocoa: Style setting supported in TListBox/TCheckListBox
This commit is contained in:
parent
62c26af930
commit
a851bf46fa
@ -61,6 +61,7 @@ type
|
||||
class function GetState(const ACheckListBox: TCustomCheckListBox; const AIndex: integer): TCheckBoxState; override;
|
||||
class procedure SetState(const ACheckListBox: TCustomCheckListBox; const AIndex: integer; const AState: TCheckBoxState); override;
|
||||
class function GetCheckWidth(const ACheckListBox: TCustomCheckListBox): integer; override;
|
||||
class procedure SetStyle(const ACustomListBox: TCustomListBox); override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -158,6 +159,8 @@ begin
|
||||
//list.AllowMixedState := TCustomCheckListBox(AWinControl).AllowGrayed;
|
||||
list.isOwnerDraw := lclCheckListBox.Style in [lbOwnerDrawFixed, lbOwnerDrawVariable];
|
||||
|
||||
ListBoxSetStyle(list, TCustomListBox(AWinControl).Style);
|
||||
|
||||
scroll := EmbedInScrollView(list);
|
||||
if not Assigned(scroll) then
|
||||
begin
|
||||
@ -237,4 +240,10 @@ begin
|
||||
Result:= Round( CocoaConfigListView.vsList.item.checkBoxOccupiedWidth );
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSCustomCheckListBox.SetStyle(
|
||||
const ACustomListBox: TCustomListBox);
|
||||
begin
|
||||
TCocoaWSCustomListBox.SetStyle( ACustomListBox );
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -2726,8 +2726,8 @@ var
|
||||
view: TCocoaTableListView;
|
||||
begin
|
||||
view := getTableViewFromLCLListBox(ACustomListBox);
|
||||
ListBoxSetStyle(view, TCustomListBox(ACustomListBox).Style);
|
||||
view.setNeedsDisplay_(true);
|
||||
ListBoxSetStyle(view, ACustomListBox.Style);
|
||||
view.reloadData;
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSCustomListBox.SetTopIndex(const ACustomListBox: TCustomListBox; const NewTopIndex: integer);
|
||||
|
Loading…
Reference in New Issue
Block a user