mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 02:12:33 +02:00
cocoa: fix the visibility of ListBox #25362, based on patch provided by accSone
git-svn-id: trunk@43494 -
This commit is contained in:
parent
03aca40d68
commit
a137955dff
@ -123,7 +123,9 @@ begin
|
||||
Result := TCocoaScrollView.alloc.initWithFrame(NSNullRect);
|
||||
if Assigned(p) then p.addSubView(Result);
|
||||
Result.lclSetFrame(r);
|
||||
Result.setHidden(p.isHidden);
|
||||
Result.setDocumentView(AView);
|
||||
AView.setHidden(false);
|
||||
SetViewDefaults(Result);
|
||||
end;
|
||||
|
||||
|
@ -881,22 +881,29 @@ var
|
||||
list : TCocoaListView;
|
||||
scroll : TCocoaScrollView;
|
||||
begin
|
||||
list:=NSView(TCocoaListView.alloc).lclInitWithCreateParams(AParams);
|
||||
list.callback:=TLCLCommonCallback.Create(list, AWinControl);
|
||||
list.list:=TCocoaStringList.Create(list);
|
||||
list := NSView(TCocoaListView.alloc).lclInitWithCreateParams(AParams);
|
||||
if not Assigned(list) then
|
||||
begin
|
||||
Result := 0;
|
||||
Exit;
|
||||
end;
|
||||
list.callback := TLCLCommonCallback.Create(list, AWinControl);
|
||||
list.list := TCocoaStringList.Create(list);
|
||||
list.addTableColumn(NSTableColumn.alloc.init);
|
||||
list.setHeaderView(nil);
|
||||
list.setDataSource(list);
|
||||
|
||||
if not Assigned(list) then begin
|
||||
Result:=0;
|
||||
scroll := EmbedInScrollView(list);
|
||||
if not Assigned(scroll) then
|
||||
begin
|
||||
list.dealloc;
|
||||
Result := 0;
|
||||
Exit;
|
||||
end;
|
||||
scroll:=EmbedInScrollView(list);
|
||||
scroll.callback:=list.callback;
|
||||
scroll.callback := list.callback;
|
||||
scroll.setHasVerticalScroller(true);
|
||||
scroll.setAutohidesScrollers(true);
|
||||
Result:=TLCLIntfHandle(scroll);
|
||||
Result := TLCLIntfHandle(scroll);
|
||||
end;
|
||||
|
||||
class function TCocoaWSCustomListBox.GetStrings(const ACustomListBox: TCustomListBox):TStrings;
|
||||
|
Loading…
Reference in New Issue
Block a user