Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8742049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:25:52+00:00 2026-06-13T11:25:52+00:00

I am using Ribbon XML and VS 2010 to build some custom button controls

  • 0

I am using Ribbon XML and VS 2010 to build some custom button controls to Outlook 2010, but having some problem refreshing the state of the buttons.

I created 2 buttons for idMso=”TabReadMessage” (Reading email window/inspector).

Ribbon XML code for the buttons:

<tab idMso="TabReadMessage">
  <group id="MyGroup" label="My Label">
     <splitButton id="MySplitButton" keytip="QS" size="large">
          <button id="SplitButton1" onAction="SplitButton1_Click" label="SplitButton 1" />
          <menu id="SplitButton_mnu" keytip="QS">
                <button id="Button1" onAction="Button1_Click" label="Button 1" />
                <button id="Button2" onAction="Button2_Click" label="Button 2"/>
          </menu>
     </splitButton>
     <toggleButton id="MyToggleButton" onAction="MyToggleButton_Click" size="large" label="Toggle Button" getEnabled="GetEnabledToggleButton" />
  </group>
</tab>

Split button click callback:

Public Sub SplitButton1_Click(ByVal control As IRibbonControl)
   ribbon.InvalidateControl("MyToggleButton")
End Sub

Toggle button getEnabled callback event:

Public Function GetEnabledToggleButton(ByVal control As IRibbonControl) As Boolean
   Return False
End Function

What I want to achieve is that after I click on the SplitButton, the ToggleButton will be disabled, I am using ribbon.InvalidateControl(“MyToggleButton”) to invalidate the control and this should fire the getEnabled callback event for the ToggleButton, but it didn’t. But if I click away from the inspector window and click in again to the inspector window, the state will change and work. I thought InvalidateControl() will change the state of the control immediately?

Please help, thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:25:53+00:00Added an answer on June 13, 2026 at 11:25 am

    I create a subroutine in the Addin class, in this subroutine I invalidate the MyToggleButton control.

    The SplitButton1_Click() event will call the subroutine, thus will invalidate the MyToggleButton control, this work, but not sure whether there is a better/recommended way to do this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a custom ribbon button within Outlook 2007 using Visual Studio
I use Ribbon XML to create a custom Ribbon in Outlook 2010. In this
I'm using XML to create a custom Excel Ribbon in which I have a
I'm using the CRM Visual Ribbon Editor to create a custom button which sends
Build a menu using the WPF Ribbon. My application is in the MVVM pattern.
I'm having trouble using the Ribbon control from the Office 2007 RibbonControlsLibrary.dll. It works
I am using Delphi 2010 to implement an Application Menu for my ribbon control...
I am a newbie to using Delphi 2010 to write Ribbon Control... I wanted
I am using the Fluent Ribbon and got stuck with this problem. I have
I have no idea why, but using Delphi 2009's ribbon control, the small images

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.