Print Page | Close Window

ComboBox label

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=9146
Printed Date: 01 July 2024 at 12:31am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ComboBox label
Posted By: Michl
Subject: ComboBox label
Date Posted: 19 December 2007 at 10:27am
Hi,
 
in our ribbonbar is a combobox. To show a label we changed the style to xtpButtonCaption. But if you add this combobox to quickaccess with right mouse button, the label is hiding!?
 
I found the place where style is overwritten:

LRESULT CXTPRibbonBar::OnCustomizeCommand(WPARAM wParam, LPARAM lParam)
{
 NMXTPCONTROL* tagNMCONTROL = (NMXTPCONTROL*)lParam;
 CXTPControl* pControl = (CXTPControl*)tagNMCONTROL->pControl->GetTag();
 if (wParam == XTP_ID_RIBBONCUSTOMIZE_ADD)
 {
  GetCommandBars()->ClosePopups();
  m_bInRecalcLayout = TRUE;
  pControl = m_pQuickAccessControls->AddClone(pControl, -1, TRUE);
  pControl->SetBeginGroup(FALSE);
  pControl->SetVisible(TRUE);
  if (pControl->GetType() == xtpControlGallery || pControl->GetType() == xtpControlPopup)
   pControl->SetStyle(xtpButtonIcon);
  else
   pControl->SetStyle(xtpButtonAutomatic);
  m_bInRecalcLayout = FALSE;
  OnRecalcLayout();
  return TRUE;
 }

Ok. I can overwrite the message, copy the source and remove the line

   pControl->SetStyle(xtpButtonAutomatic);
 
But why is this done??? Make this sense?
 
Regards
Michael



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