QAT Toolbar

Topics related to the Krypton Ribbon.

Moderators: Phil Wright, Chris Porter

QAT Toolbar

Postby robert11 » Tue Dec 13, 2011 11:54 pm

Does anyone know how to track if user chooses to show or hide one of the items on the QAT?
The form starts with all controls showing, but if one is Unchecked on the dropdown menu, how
do I track it. I do not see any events such as QAT.item.selected

Any ideas?

Thanks in advance
Robert
robert11
 
Posts: 48
Joined: Sun Feb 15, 2009 11:10 am

Re: QAT Toolbar

Postby ghaberek » Thu Dec 29, 2011 7:41 am

It looks like the Visible property for each KryptonRibbonQATButton control gets changed when they are toggled on and off by the user.

So you should be able to use the PropertyChanged event for each button to track its state:

Code: Select all
private void kryptonRibbonQATButton1_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
    var button = (KryptonRibbonQATButton)sender;

    if (e.PropertyName == "Visible")
    {
        if (button.Visible)
        {
            // do something
        }
        else
        {
            // do something else
        }
    }
}


Alternatively, you just preserve the state of the QAT buttons during FormClosing and restore it later during Load:

Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
    foreach (KryptonRibbonQATButton button in kryptonRibbon1.QATButtons)
    {
        button.Visible = /* determine state here */;
    }
}

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
    foreach (KryptonRibbonQATButton button in kryptonRibbon1.QATButtons)
    {
        /* save state here */
    }
}
ghaberek
 
Posts: 10
Joined: Wed Jul 27, 2011 6:36 am

Re: QAT Toolbar

Postby robert11 » Mon Jan 02, 2012 2:23 am

Thanks for your reply.

After some playing, I was able to give the clients what they wanted

Basically the look and feel of "Office 2010" customize QAT Toolbar page selection
from the Options. Now just have to finish working on the Backstage veiw.

Would be nice to hear from Phil on these issues, as that is a "major" part of the
Office 2010 ribbon schema.

Once again, thanks for your reply.
robert11
 
Posts: 48
Joined: Sun Feb 15, 2009 11:10 am

Re: QAT Toolbar

Postby Albert852 » Tue Nov 27, 2012 1:46 am

This bar is located at the top of the page but its entire functions can be easily judged by the Ribbon and also operate very comfortably.
Albert852
 
Posts: 1
Joined: Sat Nov 24, 2012 1:54 am


Return to Krypton Ribbon

Who is online

Users browsing this forum: No registered users and 2 guests

cron