Print Page | Close Window

Set an Height for the CommandBar

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=11446
Printed Date: 01 March 2025 at 12:53am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Set an Height for the CommandBar
Posted By: FSauer
Subject: Set an Height for the CommandBar
Date Posted: 15 July 2008 at 4:00am

Hi at all.

How can i set an Height for my CommandBar?
 
I test some ideas, but nothing works.
Have any body a solution?
 
At the moment it looks like:
 
It should looks like:
 
 
Below is my Code:
 
CXTPCommandBars* pCommandBars = GetCommandBars();
 pCommandBars->GetCommandBarsOptions()->bShowExpandButtonAlways = FALSE;

 CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(_T("Menu Bar"), IDR_MAINFRAME);
 pMenuBar->SetFlags(xtpFlagIgnoreSetMenuMessage | xtpFlagHideMDIButtons | xtpFlagAlignTop );
// pMenuBar->SetVisible(FALSE);

 CXTPToolBar* pStandardBar = (CXTPToolBar*)pCommandBars->Add(_T("Standard"), xtpBarTop);
 if (!pStandardBar ||
  !pStandardBar->LoadToolBar(IDR_STANDARDBAR))
 {
  CSysDiagApp::m_Log.WriteLine("[Fehler]\t Toolbar erzeugen fehlgeschlagen!");
  return -1;
 }
 pStandardBar->SetShowGripper(FALSE);
 pStandardBar->EnableDocking(xtpFlagAlignTop | xtpFlagStretched | xtpFlagSmartLayout);
 pStandardBar->SetCloseable(FALSE);

 CSize size = pStandardBar->GetButtonSize();
 size.cy -= 5;
// pStandardBar->SetButtonSize(CSize(60,20));
// pStandardBar->SetIconSize(CSize(16,16));
 pCommandBars->GetImageManager()->SetIcons(IDB_LARGEICONS);

 
Regards
Fabian



Replies:
Posted By: Oleg
Date Posted: 15 July 2008 at 9:20am
Hello,
you can try
 
GetCommandBars()->GetCommandBarsOptions()->bShowTextBelowIcons =TRUE
instead
xtpFlagSmartLayout


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


Posted By: FSauer
Date Posted: 15 July 2008 at 9:31am
Great, thats ok.
Thank you Oleg!!!



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