Print Page | Close Window

SetCloseSubMenuOnClick - redraw problem

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=14348
Printed Date: 21 December 2024 at 8:44pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: SetCloseSubMenuOnClick - redraw problem
Posted By: znakeeye
Subject: SetCloseSubMenuOnClick - redraw problem
Date Posted: 20 May 2009 at 7:53am
Here's a popup-gallery (SetCloseSubMenuOnClick = FALSE):
 
"Clear" has been pressed, but the list is not redrawn until I hover it with the mouse!
 

When I press "Clear" the following code is executed:
 
void CMainFrame::OnGalleryClear()
{
 for (int i = 0; i < m_pItems->GetItemCount(); ++i)
 {
  CControlGalleryItem *pItem = DYNAMIC_DOWNCAST(CControlGalleryItem, m_pItems->GetItem(i));
  ASSERT(pItem);
  if (pItem)
   pItem->SetChecked(FALSE);
 }
}

Q: How do I enforce a redraw of the list here?


-------------
PokerMemento - http://www.pokermemento.com/



Replies:
Posted By: Oleg
Date Posted: 21 May 2009 at 1:34am
Hi,
 
We don't have SetChecked method - so its part of your code - add pGallery->InvalidateItems(); after.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date Posted: 21 May 2009 at 6:28am
Is there a nice way of getting the gallery pointer?
Do I have to use pRibbon->Find...?

-------------
PokerMemento - http://www.pokermemento.com/


Posted By: Oleg
Date Posted: 21 May 2009 at 8:42am

hi,

think best way is pCommandBars->GetActions()->GetAction(Id)->RedrawControls();


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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