如何使用CButton&amp ;;实现组合框CListCtrl的? [英] How to implement combobox using CButton & CListCtrl?

查看:52
本文介绍了如何使用CButton&amp ;;实现组合框CListCtrl的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够使用CButton和CMenu实现自定义ComboBox。

基本上使用的CButton(根据UI要求定制)和点击CButton show CMenu(有限的MenuItems)。如果我要显示一小组MenuItem,这是可以的。



如果我显示大量的MenuItems,它看起来不太好。原因:CMenu中没有滚动条支持。所以我想用CListCtrl替换CMenu(因为CListCtrl有滚动条,可根据UI要求定制)。这是一个好主意还是有其他解决方案?

解决方案

使用 CButton实现ComboBox是什么意思& CListCtrl

您可以使用 CListBox [ ^ ]显示类似于菜单的项目列表,这比 CListCtrl 更简单

I am able to implement customized ComboBox using CButton & CMenu.
Basically used CButton (customized as per UI requirement) and on click of CButton show CMenu (with limited MenuItems). This is OK if I have small set of MenuItems to be shown.

If I show big set of MenuItems, it does not look good. Reason: there is no scroll bar support in CMenu. So I want to replace, CMenu with CListCtrl (as CListCtrl has scroll bar which can be customized as per UI requirement). Is this a good idea or is there any other solution available?

解决方案

What do you mean by implements ComboBox using CButton & CListCtrl?
You can use a CListBox[^] to display a list of items similar to a menu, which is somewhat simpler than a CListCtrl.


这篇关于如何使用CButton&amp ;;实现组合框CListCtrl的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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