mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 19:19:19 +02:00
cocoa: introducing lclSetColumnAlign to allow set allignment for cell and view based tables
git-svn-id: trunk@62724 -
This commit is contained in:
parent
7d8ad4dd58
commit
cc3d447e35
@ -125,6 +125,7 @@ type
|
||||
function lclGetIconRect(ARow, ACol: Integer; const BoundsRect: TRect): TRect; message 'lclGetIconRect:::';
|
||||
|
||||
procedure lclInsDelRow(Arow: Integer; inserted: Boolean); message 'lclInsDelRow::';
|
||||
procedure lclSetColumnAlign(acolumn: NSTableColumn; aalignment: NSTextAlignment); message 'lclSetColumn:Align:';
|
||||
|
||||
// NSTableViewDataSourceProtocol
|
||||
function numberOfRowsInTableView(tableView: NSTableView): NSInteger; message 'numberOfRowsInTableView:';
|
||||
@ -201,6 +202,7 @@ type
|
||||
procedure tableView_setObjectValue_forTableColumn_row(tableView: NSTableView; object_: id; tableColumn: NSTableColumn; row: NSInteger); message 'tableView:setObjectValue:forTableColumn:row:';
|
||||
function tableView_dataCellForTableColumn_row(tableView: NSTableView; tableColumn: NSTableColumn; row: NSInteger): NSCell; message 'tableView:dataCellForTableColumn:row:';
|
||||
procedure lclInsDelRow(Arow: Integer; inserted: Boolean); override;
|
||||
procedure lclSetColumnAlign(acolumn: NSTableColumn; aalignment: NSTextAlignment); override;
|
||||
end;
|
||||
|
||||
TCellCocoaTableListView1013 = objcclass(TCellCocoaTableListView, NSTableViewDelegateProtocol, NSTableViewDataSourceProtocol)
|
||||
@ -467,6 +469,12 @@ begin
|
||||
// as well as number of total items in the table should be marked as modified
|
||||
end;
|
||||
|
||||
procedure TCocoaTableListView.lclSetColumnAlign(acolumn: NSTableColumn;
|
||||
aalignment: NSTextAlignment);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
function TCocoaTableListView.acceptsFirstResponder: LCLObjCBoolean;
|
||||
begin
|
||||
Result := NSViewCanFocus(Self);
|
||||
@ -946,6 +954,14 @@ begin
|
||||
noteNumberOfRowsChanged;
|
||||
end;
|
||||
|
||||
procedure TCellCocoaTableListView.lclSetColumnAlign(acolumn: NSTableColumn;
|
||||
aalignment: NSTextAlignment);
|
||||
begin
|
||||
if not Assigned(acolumn) then Exit;
|
||||
NSCell(acolumn.headerCell).setAlignment( aalignment );
|
||||
NSCell(acolumn.dataCell).setAlignment( aalignment );
|
||||
end;
|
||||
|
||||
function TCellCocoaTableListView.tableView_objectValueForTableColumn_row(
|
||||
tableView: NSTableView; tableColumn: NSTableColumn; row: NSInteger): id;
|
||||
var
|
||||
|
@ -1136,8 +1136,7 @@ const
|
||||
);
|
||||
begin
|
||||
if not CheckColumnParams(lTableLV, lNSColumn, ALV, AIndex) then Exit;
|
||||
NSCell(lNSColumn.headerCell).setAlignment( txtAlign[AAlignment] );
|
||||
NSCell(lNSColumn.dataCell).setAlignment( txtAlign[AAlignment] );
|
||||
lTableLV.lclSetColumnAlign(lNSColumn, txtAlign[AAlignment]);
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSCustomListView.ColumnSetAutoSize(
|
||||
|
Loading…
Reference in New Issue
Block a user