CommandBarComboBox.Text problem in 9.80 |
Post Reply |
Author | |
dajv
Groupie Joined: 27 July 2004 Location: Australia Status: Offline Points: 80 |
Post Options
Thanks(0)
Posted: 27 October 2005 at 12:36am |
I get the error "Method 'Text' of object 'ICommandBarComboBox' failed" when I use CommandBarComboBox.Text.
e.g. ComboControl.Text = "" I never had this problem with versions prior to 9.80. Is this a known problem? Let me know if you need me to reproduce it in a small app, but I haven't changed anything since it was working in a previous version. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Sorry, we can't reproduce it, please attach small sample.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
dajv
Groupie Joined: 27 July 2004 Location: Australia Status: Offline Points: 80 |
Post Options
Thanks(0)
|
I just tried to reproduce it but with no success. it a small project it works fine.
I never had this error before. Why might method 'Text' of object 'ICommandBarComboBox' fail? |
|
dajv
Groupie Joined: 27 July 2004 Location: Australia Status: Offline Points: 80 |
Post Options
Thanks(0)
|
Actually I was able to reproduce it. I discovered it is a problem when using designerbars.
2005-10-27_182821_reproduce.zip |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Instead CommandBars1.DesignerControls.Find you must use CommandBars1.FindControl And DropDownListStyle must be True to set text.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
dajv
Groupie Joined: 27 July 2004 Location: Australia Status: Offline Points: 80 |
Post Options
Thanks(0)
|
oleg the Designer Bars have been saved with the combobox DropDownStyle set to DropDownList. Using FindControl does retrieve the control but commandbarcombobox.Text = "bye" doesn't have any effect.
Looking at the commandbarcombobox object in Command5_Click() once the FindControl line executes, the .DropDownListStyle property is set to False. This should be set to True because the control in the DesignerBars has been set to DropDownListStyle. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
It is correct that commandbarcombobox.Text = "bye" doesn't have any effect. because it has no editable part. you must use ListIndex to change text: commandbarcombobox.ListIndex = 1 commandbarcombobox.ListIndex = commandbarcombobox.FindItem("bye") |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
dajv
Groupie Joined: 27 July 2004 Location: Australia Status: Offline Points: 80 |
Post Options
Thanks(0)
|
I never had to use CommandBars.FindControl to do it before, but it works now.
|
|
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 |