Difference between revisions of "Cocoa Interface"

From Free Pascal wiki
(replacing Mac OS X template by macOS template.)
Line 4: Line 4:
 
==Cocoa bindings==
 
==Cocoa bindings==
 
This interface uses the native support in Free Pascal for direct communication with Objective-C was added through the [[FPC PasCocoa|Objective Pascal]] dialect.
 
This interface uses the native support in Free Pascal for direct communication with Objective-C was added through the [[FPC PasCocoa|Objective Pascal]] dialect.
 +
 +
==Cocoa FAQ==
 +
 +
===TButton looks too small!===
 +
If you design a button in another widgetset with Autosize=Off it might happen that the button looks too small in Cocoa, and a number of people complained about this, such as in these BTS reports: [https://bugs.freepascal.org/view.php?id=31185].
 +
 +
If you don't care about the button size, just set AutoSize=True. If you want to have a custom width for the button, but wants to allow the LCL to choose the right Height so that the button will look good in Cocoa, then the solution in this case is to set the following properties in the Object Inspector:
 +
 +
* AutoSize=True
 +
* Constrains.MinWidth = Constrains.MaxWidth = your desired width.
  
 
==Roadmap==
 
==Roadmap==

Revision as of 08:08, 20 May 2017

macOSlogo.png

This article applies to macOS only.

See also: Multiplatform Programming Guide

Apple iOS new.svg

This article applies to iOS only.

See also: Multiplatform Programming Guide

Other Interfaces

Platform specific Tips

Interface Development Articles

Cocoa bindings

This interface uses the native support in Free Pascal for direct communication with Objective-C was added through the Objective Pascal dialect.

Cocoa FAQ

TButton looks too small!

If you design a button in another widgetset with Autosize=Off it might happen that the button looks too small in Cocoa, and a number of people complained about this, such as in these BTS reports: [1].

If you don't care about the button size, just set AutoSize=True. If you want to have a custom width for the button, but wants to allow the LCL to choose the right Height so that the button will look good in Cocoa, then the solution in this case is to set the following properties in the Object Inspector:

  • AutoSize=True
  • Constrains.MinWidth = Constrains.MaxWidth = your desired width.

Roadmap

Located here: Roadmap#Status_of_features_on_each_widgetset