有一个ComboBox有类似TcxRadioGroup的项目? [英] Is there a ComboBox that has Items like a TcxRadioGroup?

查看:330
本文介绍了有一个ComboBox有类似TcxRadioGroup的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DevExpress的TcxRadioGroup组件有一个很好的方法来指定项目。您可以为每个TcxRadioGroupItem指定Caption和值(和标签)。



另一方面,TcxComboBox和正常的TComboBox使用TStrings来存储它的项。



虽然TStrings可以有一个名称和一个对象,但没有一个简单的方法来连接一个名称和值使用Delphi IDE的窗体设计器。 p>

有一个ComboBox控件(最好从DevExpress)允许用Caption和值来可视地设计它的项目。



PS:我不是正在寻找DB感知控件。

解决方案

尝试TcxImageComboBox 。请参见此处 - 无需指定图片名称。您也可以直观地编辑项目。



(因为分隔说明/值,所以在cxGrid中用作单元格编辑器。)


The TcxRadioGroup component of DevExpress has a very nice way to specify items. You can specify a Caption and a Value (and a Tag) for each TcxRadioGroupItem.

The TcxComboBox and the normal TComboBox of Delphi on the other hand use TStrings to store its items.

While TStrings can have a Name and an Object, there is no easy way to hook up a name and a value using the form designer of the Delphi IDE.

Is there a ComboBox control (preferably from DevExpress) that allows to visually design its items with a Caption and a Value?

PS: I'm not looking for a DB aware control.

解决方案

Try a TcxImageComboBox. See here - you don't have to assign images despite the name. You can also edit the items visually.

(I use it as cell editor in cxGrids because of the separation Description/Value.)

这篇关于有一个ComboBox有类似TcxRadioGroup的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆