如何使 TRibbonComboBox 像具有 csDropDownList 样式的 TCombobox 一样?我们不希望用户能够编辑列表中的选项。
我们需要使用 TRibbonComboBox 因为我们希望当前选择可见。
Microsoft word 显示一个组合框,您可以在其中选择一个项目,但不能编辑该项目本身。
我应该考虑在功能区中尝试一个 TCombobox 吗?我希望它看起来不会或无法正常工作。
谢谢你的评论!
如何使 TRibbonComboBox 像具有 csDropDownList 样式的 TCombobox 一样?我们不希望用户能够编辑列表中的选项。
我们需要使用 TRibbonComboBox 因为我们希望当前选择可见。
Microsoft word 显示一个组合框,您可以在其中选择一个项目,但不能编辑该项目本身。
我应该考虑在功能区中尝试一个 TCombobox 吗?我希望它看起来不会或无法正常工作。
谢谢你的评论!
You can just use TRibbonComboBox.ReadOnly
:
Determines whether the user can change the text of the edit control.
And furthermore:
Setting ReadOnly to true ensures that the text is not altered, while still allowing the user to select text. The selected text can then be manipulated by the application, or copied to the Clipboard.
(see documentation)