Print Page | Close Window

Ribbon Group selection persistence

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=20210
Printed Date: 18 May 2024 at 7:02pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbon Group selection persistence
Posted By: jharvey
Subject: Ribbon Group selection persistence
Date 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!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net