【问题标题】:How to perform with CheckBox and RadioButton in RibbonControl in DevExpress?如何在 DevExpress 的 RibbonControl 中使用 CheckBox 和 RadioButton?
【发布时间】:2013-12-28 03:09:08
【问题描述】:

如何在 RibbonControl 中使用 CheckEdit?我拖动 CheckEdit 并将其放置在 RibbonPage 中。但是像Button这样的显示如何将其更改为普通的“CheckBox”??

我使用 RadioGroup 并通过 SelectedIndexChanged 执行,我现在隐藏标题,它只显示 RadioButtons。但我需要对 RadioGroup 不常见的特定 RadioButton 的标题。我添加了 3 个 RadioButton,因此我需要在特定 RadioButton 附近/下方显示 3 个标题。

如何完成我的任务?帮我。提前致谢。

【问题讨论】:

    标签: c# checkbox devexpress radio-group ribbon-control


    【解决方案1】:

    您可以使用功能区设计器将 CheckEdit 分配给您的功能区页面。

    这将显示为正常的 CheckEdit。 要向您的 RadioGroup 添加描述,您必须通过添加 RadioGroupItems

    radiogroup.edit.items
    

    财产。每个项目都可以包含一个描述和一个值。如果 RibbonPage 足够大以显示描述,则描述将显示在 Ribbon 中!更多信息在这里:

    http://documentation.devexpress.com/#windowsforms/clsDevExpressXtraEditorsRadioGrouptopic

    【讨论】:

    • 嗨,Sebi,感谢您的回答。如果我选择 Checkedit,则 CheckedChanged 事件在该项目中不可用。我该如何编写代码?
    • @Sri Hari 到目前为止,我刚刚发现了一条肮脏的方式。您可以使用 repositoryItemCheckEdit 来处理 CheckChanged 事件。然后您可以使用 baredititem1.EditValue 成为值。在设计器中将 EditValue 声明为 bool 并将其转换为您的代码。如果您需要示例,请告诉我。
    猜你喜欢
    • 2014-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-27
    • 2014-03-21
    • 1970-01-01
    相关资源
    最近更新 更多