SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

ToolBarCommand Change

Last post 07-14-2007 9:34 AM by sbosanquet. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-10-2007 9:23 PM

    ToolBarCommand Change

    Hi,

    To be able to use the feature (Example):

    ToolStrip toolstrip;

    ...

    toolstrip.Items["Id"].Enable = true;

    where Id is the id specified in the addin file.  Otherwise you can only use the index to specify the item.

    The following patch can be inserted in: src\Main\Core\Project\Src\AddInTree\AddIn\DefaultDoozers\ToolBarItem\Gui\ToolBarCommand.cs

     Index: ToolBarCommand.cs
    ===================================================================
    --- ToolBarCommand.cs (revision 2599)
    +++ ToolBarCommand.cs (working copy)
    @@ -21,6 +21,7 @@
        this.RightToLeft = RightToLeft.Inherit;
        this.caller        = caller;
        this.codon         = codon;
    +   this.Name     = codon.Id;
        
        if (createCommand) {
         menuCommand = (ICommand)codon.AddIn.CreateObject(codon.Properties["class"]);

    There may be a better solution as i have only had a limited chance to look at it.

    Filed under:
  • 07-14-2007 9:34 AM In reply to

    Re: ToolBarCommand Change

    Any thoughts or comments on this? 

     If it is a bad idea then i will go back to hard coding in the item index numbers.

Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.