How To Put a ComboBox into a Toolbar (153928)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic for Applications 5.0
This article was previously published under Q153928 SUMMARY
This article describes how to use the Toolbar control in the 32-bit version
of Visual Basic 4.0 to allow programmers to add buttons to the Toolbar but
not ComboBoxes. If you create a ComboBox at design time and place it on top
of the Toolbar, the ComboBox will not appear when the program is run. This
behavior occurs because the Toolbar has a higher precedence than the
ComboBox on the Z-order.
To put a ComboBox on a Toolbar, create a button on the Toolbar to act
as a place holder, and position the ComboBox above the place holder in the
Z-order, because you cannot place the ComboBox inside the place holder
directly.
The following code sample showing how this effect can be achieved.
Modification Type: | Minor | Last Reviewed: | 3/15/2005 |
---|
Keywords: | kbControl kbhowto KB153928 |
---|
|