![]() |
Adding a Combo Box to Command Bar |
Post Reply ![]() |
Author | |
shagge22 ![]() Newbie ![]() ![]() Joined: 21 November 2006 Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() Posted: 01 March 2007 at 11:00am |
I am adding a combo box to a command bar. I need to display a text string that is much longer than the size of the combo box. Is there a way to expand the width of the combo box? I am using version 10.3.
Code: Dim Control As CommandBarControl Dim PresetBar As CommandBar Set PresetBar = Cmd_Bar.Add("Preset", xtpBarTop) With PresetBar.Controls Set Control = .Add(xtpControlLabel, ID_PRESET_LABEL, "Saved Scanner Presets:") Set Control = .Add(xtpControlComboBox, ID_PRESET_COMBO, "No Scanner Presets Available") Control.Enabled = True Set Control = .Add(xtpControlButton, ID_PRESET_BUTTON, "") Control.Caption = "Set Default" End With |
|
![]() |
|
jcollier ![]() Senior Member ![]() Joined: 15 February 2006 Status: Offline Points: 250 |
![]() ![]() ![]() ![]() ![]() |
I did the following with a Ribbon. I'm not sure if it's the 'preferred' method, but it worked.
In General Declarations: Dim FilterCombo as CommandBarComboBox In function that creates the ribbonbar: Dim ControlCombo As CommandBarComboBox Set ControlCombo = GroupContainer.Add(xtpControlComboBox, ID_FILTERCONTAINERLIST, "Filter") ControlCombo.Width = 200 ControlCombo.DropDownListStyle = False ControlCombo.EditHint = "Container Filter..." ControlCombo.AddItem "Find Unbilled Containers Due Today" ControlCombo.AddItem "Find Unbilled Containers Past Due" ControlCombo.AddItem "Find Unbilled Containers Not Past Due" Set FilterCombo = ControlCombo 'then use FilterCombo to call events. You'll have to alter it a bit for 'command bars but I hope this helps. |
|
![]() |
|
shagge22 ![]() Newbie ![]() ![]() Joined: 21 November 2006 Status: Offline Points: 14 |
![]() ![]() ![]() ![]() ![]() |
That worked.
Thanks for your help... |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |