Firemonkey Checkbox:Windows 和 MacOS 平台上是否有可用的三态选项?

Firemonkey Checkbox : Is there a tristate option usable on Windows and MacOS platform?

我正在寻找一种方法来创建一个状态未定义以及状态为打开和关闭的复选框。这种第三种状态在 Mac 上常见吗?如果不常见,您如何理解地解决它?

是的,MacOS 原生支持第三种状态。引自 Apples Human Interface Guideline:

Use a mixed state when it makes sense. A checkbox should accurately reflect its state. If a checkbox is used to globally enable and disable multiple child checkboxes, it should show a mixed state—reflected by a dash—when those children are not all in the same state.

您需要创建自己的按钮 class 才能实现此目的。使用添加三态选项的 FMX 样式按钮。或围绕本机按钮的 FMX 包装器。如果您想使用本地语言,可以使用 TMS mCL component suite,但它不是免费的。