Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - ControlGallery in Ribbon initially shown small
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ControlGallery in Ribbon initially shown small

 Post Reply Post Reply
Author
Message
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 239
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Topic: ControlGallery in Ribbon initially shown small
    Posted: 10 January 2017 at 9:44am
As you can see in the animated GIF, the gallery is shown as a small icon.
But when i change the tabs it is as it should be:




what can i do to force the "big" size?

pPopup = (CXTPControlPopup*)pGroup->Add(xtpControlSplitButtonPopupID_SELECT_VIEW); pPopup->SetCaption(GetRibbonItemText(ID_SELECT_VIEW, pRibbonHelperMenu)); CXTPControlGallery* pControlGallery = (CXTPControlGallery*)pPopup->GetCommandBar()->GetControls()->Add(new CXTPControlGallery(), ID_GALLERY_VIEWTYPES); pControlGallery->ShowScrollBar(FALSE); pControlGallery->SetStyle(xtpButtonIconAndCaption); pControlGallery->SetItemsMargin(XTP_DPI_X(2), XTP_DPI_Y(2), XTP_DPI_X(2), XTP_DPI_Y(2)); CXTPControlGalleryItems* pGalViewItems = CXTPControlGalleryItems::CreateItems(GetCommandBars(), ID_GALLERY_VIEWTYPES); pGalViewItems->SetItemSize(CSize(0, 38)); // XTP_DPI is done internally pGalViewItems->ClipItems(FALSE); pGalViewItems->GetImageManager()->SetIcons(IDB_PNG_VIEWTYPES, 0, 0, CSize(32, 32)); pGalViewItems->AddItem(GetRibbonItemText(ID_MDIVIEW_TOGGLE_CRDVIEW, pRibbonHelperMenu), EUIViewPresentationType::Card, 0); pGalViewItems->AddItem(GetRibbonItemText(ID_MDIVIEW_TOGGLE_BRWVIEW, pRibbonHelperMenu), EUIViewPresentationType::Browse, 1);
...


Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 239
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Posted: 17 January 2017 at 11:29am
I use XTP 17.3!
Any idea or option?

Please help me Codejock Team  :-)
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 478
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 18 January 2017 at 2:48am
I have no idea if this helps or what it does, but it seems to be very popular to add this line of code:
pPopup->SetFlags(xtpFlagManualUpdate);
pPopup->SetStyle(xtpButtonIconAndCaptionBelow);

-cpede
Product: Xtreme ToolkitPro (17.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2015 (C++) - Update 3
Back to Top
Jonas R. View Drop Down
Newbie
Newbie


Joined: 01 February 2017
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jonas R. Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2017 at 7:00am
Hi Codejock Team,

we are still facing this issue. :/
Any information on how to tackle it would be really appreciated. Thanks!
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 239
Post Options Post Options   Thanks (1) Thanks(1)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Posted: 29 March 2017 at 4:55am
I found a solution!

1. It is important to reset the Ribbon (Config)
2. this option helped me to solve the Problem:
 pGroup->AllowReduce(xtpRibbonGroupReductionDisabled);

:-)
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 239
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2017 at 3:17am
Unfortunately it does not work in every situation.
It looks like the serialization of ribbons has problems with DPI-Awareness?
Back to Top
Alex H. View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 February 2004
Status: Offline
Points: 239
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alex H. Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2017 at 3:37am
is there a relation with

http://forum.codejock.com/forum_posts.asp?TID=23212&KW=DPI&title=solved-ribbon-loadcommandbars-bug

?

because  CXTPControlGallery::DoPropExchange also uses
PX_DPI_Rect
Back to Top
BeeJay View Drop Down
Groupie
Groupie
Avatar

Joined: 12 March 2013
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote BeeJay Quote  Post ReplyReply Direct Link To This Post Posted: 31 May 2017 at 3:56am
any news on this?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.094 seconds.