简体   繁体   English

vb6中的多级组合框

[英]Multilevel Combo box in vb6

I am trying to create a multilevel combobox in vb6 similar to that seen in the attached image. 我试图在vb6中创建一个类似于附图中所见的多级组合框。 This box will be used to select values and then save same to an access database (any insights into how I would design this aspect of the database is welcomed) an. 此框将用于选择值,然后将其保存到访问数据库(欢迎任何有关如何设计数据库这一方面的见解)a。 I have been searching for a method to do this, but I have not found any up to this point. 我一直在寻找一种方法来做到这一点,但到目前为止我还没有找到任何方法。 Any help would be appreciated. 任何帮助,将不胜感激。

在此输入图像描述

This looks like a Popup menu that was bounded to the ComboBox click event 这看起来像是一个Popup menu ,它与ComboBox点击事件有关

This link demonstrates how to create a popup menu programmatically 此链接演示了如何以编程方式创建弹出菜单

And If you're working with VB6, just hit CTR+E, and follow these instructions 如果你正在使用VB6,只需按CTR + E,然后按照这些说明操作

After configuring the Popup menu, all you're left to do is: 配置弹出菜单后,您要做的就是:

Private Sub ComboBox1_Click()
    Call popupMenu.ShowPopupMenu
End Sub

And make sure all the menu functions sets the Text property of of ComboBox1 并确保所有菜单函数都设置ComboBox1Text属性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM