Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Ribbon Group selection persistence
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon Group selection persistence

 Post Reply Post Reply
Author
Message
jharvey View Drop Down
Newbie
Newbie


Joined: 08 October 2012
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote jharvey Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon Group selection persistence
    Posted: 08 October 2012 at 12:00pm
Hi there, hoping someone here can help me out with an issue I'm having with RibbonGroups and Custom Controls.

Here's some code:

RibbonGroup rg = tab.Groups.AddGroup("Links", GROUP_ID);
foreach (PictureBox picBox in picBoxArray)
{
CommandBarControlCustom cc = rg.Add(XTPControlType.xtpControlCustom, ITEM_ID, String.Empty);
cc.Handle = p.Handle.ToInt32();
}

That's a cut down version of the code I'm using to add a set of pictures to a group on a CommandBar. Each PictureBox has a Click event which opens up a new form to display a website.

Everything gets added, appears and works fine when my main window is large enough for all the pictures to be displayed. However, if I shrink my main window to the point where all the pictures disappear and my group automatically turns into a popup group then things start playing up. If I now click on my 'Links' group and click on a PictureBox, the website opens as intended but, 
1) the popup group remains on screen until I click away from it, and
2) the 'Links' group remains darkened as if selected and is now unresponsive to mouse clicks.



If I make my main window larger again, then the pictures reappear and I can click on them as before, make it smaller again and I get my 'selected' Links group back.

Any help appreciated.

Thanks in advance!
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.188 seconds.