Cocoa: Fix the issue of scroll bar not working in Form

since macOS 10.7, NSScrollerStyleOverlay is used by default, and the scroll bar needs to be set before the DocumentView size changes.
This commit is contained in:
rich2014 2024-01-24 00:13:03 +08:00
parent ef22ee4542
commit 54d7f414ce

View File

@ -732,6 +732,8 @@ begin
cnt.wincallback := cb;
cnt.isCustomRange := true;
cnt.setHasHorizontalScroller(True);
cnt.setHasVerticalScroller(True);
cnt.setVerticalScrollElasticity(NSScrollElasticityNone);
cnt.setHorizontalScrollElasticity(NSScrollElasticityNone);
cnt.setDocumentView(doc);