I have a version where it did work, but it no longer works in the current trunk.
The procedure "SetTextFieldCell" is located within the "cocoawstextedits.pas" file.
lazarus/lcl/interfaces/cocoa/cocoawstextedits.pasIn the version that worked for me:
procedure SetTextFieldCell( const edit: TCustomEdit ; const field: NSTextField );
var
cell: NSTextFieldCell;
begin
if (field.respondsToSelector(ObjCSelector('cell'))) and Assigned(field.cell) then
begin
if CocoaConfigEdit.vertAlignCenter then begin
cell:= TCocoaVertCenterTextFieldCell.new;
field.setCell( cell );
cell.release;
end else begin
cell:= NSTextFieldCell(field.cell);
end;
cell.setWraps(false);
cell.setScrollable(true);
end;
...
end;
In the current version that isn't working:
procedure SetTextFieldCell( const edit: TCustomEdit ; const field: NSTextField );
var
cell: TCocoaVertAlignTextFieldCell;
begin
if (field.respondsToSelector(ObjCSelector('cell'))) and Assigned(field.cell) then
begin
cell:= TCocoaVertAlignTextFieldCell.new;
cell.vertAlignment:= edit.Layout;
field.setCell( cell );
cell.release;
cell.setWraps(false);
cell.setScrollable(true);
end;
...
end;
For testing purposes only, comment out the following lines, clean, rebuild, and it will work again:
//field.setCell( cell );
//cell.release;