Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - CommandBarComboBox.Text problem in 9.80
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CommandBarComboBox.Text problem in 9.80

 Post Reply Post Reply
Author
Message
dajv View Drop Down
Groupie
Groupie


Joined: 27 July 2004
Location: Australia
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote dajv Quote  Post ReplyReply Direct Link To This Post Topic: CommandBarComboBox.Text problem in 9.80
    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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2005 at 8:02am
Sorry, we can't reproduce it, please attach small sample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dajv View Drop Down
Groupie
Groupie


Joined: 27 July 2004
Location: Australia
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote dajv Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2005 at 6:16pm
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?
Back to Top
dajv View Drop Down
Groupie
Groupie


Joined: 27 July 2004
Location: Australia
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote dajv Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2005 at 6:28pm
Actually I was able to reproduce it. I discovered it is a problem when using designerbars.

2005-10-27_182821_reproduce.zip
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 28 October 2005 at 6:43am

Instead

CommandBars1.DesignerControls.Find

you must use

CommandBars1.FindControl

And DropDownListStyle must be  True to set text.

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
dajv View Drop Down
Groupie
Groupie


Joined: 27 July 2004
Location: Australia
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote dajv Quote  Post ReplyReply Direct Link To This Post Posted: 30 October 2005 at 4:49pm
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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 31 October 2005 at 2:00am

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
Back to Top
dajv View Drop Down
Groupie
Groupie


Joined: 27 July 2004
Location: Australia
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote dajv Quote  Post ReplyReply Direct Link To This Post Posted: 02 November 2005 at 4:02pm
I never had to use CommandBars.FindControl to do it before, but it works now.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.