mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 20:59:08 +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 function GetState(const ACheckListBox: TCustomCheckListBox; const AIndex: integer): TCheckBoxState; override;
|
||||||
class procedure SetState(const ACheckListBox: TCustomCheckListBox; const AIndex: integer; const AState: TCheckBoxState); override;
|
class procedure SetState(const ACheckListBox: TCustomCheckListBox; const AIndex: integer; const AState: TCheckBoxState); override;
|
||||||
class function GetCheckWidth(const ACheckListBox: TCustomCheckListBox): integer; override;
|
class function GetCheckWidth(const ACheckListBox: TCustomCheckListBox): integer; override;
|
||||||
|
class procedure SetStyle(const ACustomListBox: TCustomListBox); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -158,6 +159,8 @@ begin
|
|||||||
//list.AllowMixedState := TCustomCheckListBox(AWinControl).AllowGrayed;
|
//list.AllowMixedState := TCustomCheckListBox(AWinControl).AllowGrayed;
|
||||||
list.isOwnerDraw := lclCheckListBox.Style in [lbOwnerDrawFixed, lbOwnerDrawVariable];
|
list.isOwnerDraw := lclCheckListBox.Style in [lbOwnerDrawFixed, lbOwnerDrawVariable];
|
||||||
|
|
||||||
|
ListBoxSetStyle(list, TCustomListBox(AWinControl).Style);
|
||||||
|
|
||||||
scroll := EmbedInScrollView(list);
|
scroll := EmbedInScrollView(list);
|
||||||
if not Assigned(scroll) then
|
if not Assigned(scroll) then
|
||||||
begin
|
begin
|
||||||
@ -237,4 +240,10 @@ begin
|
|||||||
Result:= Round( CocoaConfigListView.vsList.item.checkBoxOccupiedWidth );
|
Result:= Round( CocoaConfigListView.vsList.item.checkBoxOccupiedWidth );
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TCocoaWSCustomCheckListBox.SetStyle(
|
||||||
|
const ACustomListBox: TCustomListBox);
|
||||||
|
begin
|
||||||
|
TCocoaWSCustomListBox.SetStyle( ACustomListBox );
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -2726,8 +2726,8 @@ var
|
|||||||
view: TCocoaTableListView;
|
view: TCocoaTableListView;
|
||||||
begin
|
begin
|
||||||
view := getTableViewFromLCLListBox(ACustomListBox);
|
view := getTableViewFromLCLListBox(ACustomListBox);
|
||||||
ListBoxSetStyle(view, TCustomListBox(ACustomListBox).Style);
|
ListBoxSetStyle(view, ACustomListBox.Style);
|
||||||
view.setNeedsDisplay_(true);
|
view.reloadData;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TCocoaWSCustomListBox.SetTopIndex(const ACustomListBox: TCustomListBox; const NewTopIndex: integer);
|
class procedure TCocoaWSCustomListBox.SetTopIndex(const ACustomListBox: TCustomListBox; const NewTopIndex: integer);
|
||||||
|
Loading…
Reference in New Issue
Block a user