Print Page | Close Window

New version problems

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=17959
Printed Date: 28 November 2024 at 8:56pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: New version problems
Posted By: BastianPL
Subject: New version problems
Date Posted: 25 February 2011 at 3:16pm
Hi, I have 2 problems using new version 15.0.1
For some reason subitems of systemmenu are not show as in previous version.

The code used to create this control is as usual in OnCreateControl...

if ( lpCreateControl->nID == ID_SETTINGS && lpCreateControl->nIndex == 5 )
{
CXTPControlPopup* pControl = CXTPControlPopup::CreateControlPopup( xtpControlButtonPopup );

CMenu menu;
menu.LoadMenu( IDR_SETTINGS );

CXTPRibbonSystemPopupBarPage* pPopupBar = new CXTPRibbonSystemPopupBarPage();
pPopupBar->SetCommandBars( GetCommandBars() );

pPopupBar->LoadMenu(menu.GetSubMenu(0));

CXTPControl* pControlLabel = pPopupBar->GetControls()->Add( xtpControlLabel, ID_FILE_SETTINGS_LABEL, NULL, 0 );
pControlLabel->SetWidth( 320 );
pControlLabel->SetItemDefault( TRUE );
pControlLabel->SetStyle( xtpButtonCaption );

pPopupBar->SetShowGripper( FALSE );
pPopupBar->SetDefaultButtonStyle( xtpButtonCaptionAndDescription );
pPopupBar->SetIconSize( CSize(32, 32) );

pControl->SetCommandBar( pPopupBar );
pPopupBar->InternalRelease();
lpCreateControl->pControl = pControl;
return TRUE;
}

Hoever it looks a bit doggy.. Same code was working fine in previous version.




-------------
Bastian



Replies:
Posted By: Oleg
Date Posted: 25 February 2011 at 3:57pm
you don't need create CXTPRibbonSystemPopupBarPage if you don't use it as PopupBarPage.
just create as CXTPPopupBar:
CXTPPopupBar* pPopupBar = new CXTPPopupBar();



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


Posted By: BastianPL
Date Posted: 25 February 2011 at 4:20pm
Oleg thanks for a quick response

Yes, that sorts out problems with scrolling. But in fact it loosk better as popupbarpage (like in Ribbon example where print functions are displayed in one Page).

Any other suggestions?


-------------
Bastian


Posted By: Oleg
Date Posted: 27 February 2011 at 1:51pm
Hi,

You can add more buttons to main Popup to increase its height. Now CXTPRibbonSystemPopupBarPage aligned to its height. You can copy source code of CXTPRibbonSystemPopupBarPage to your local CMyRibbonSystemPopupBarPage and not include "if (nHeight > sz.cy) sz.cy = nHeight;" line.



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


Posted By: BastianPL
Date Posted: 27 February 2011 at 2:42pm
Ok That will do for now. However maybe it will be possible to add this as a feature to next version.

Last thing will be missing frame around CXTPRibbonSystemPopupBarPage as as in your example.


-------------
Bastian



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