Print Page | Close Window

Ribbon Control "LineBreak"

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


Topic: Ribbon Control "LineBreak"
Posted By: dandan
Subject: Ribbon Control "LineBreak"
Date Posted: 11 January 2007 at 6:48am
Hi,
Is it possible to insert something like a "Linebreak" in a Group of many Buttons manually?
 
What i have now when the Window is maximized:
[_Button+Caption_____]
[_Button+Caption_____] [_Textbox+Caption____]
 
When i resize the Window, the Textbox goes to the third line (where i want it)
But i also want it in the third line on a full screen window.
 
Like this:
[_Button+Caption_____]
[_Button+Caption_____]
[_Textbox+Caption____]
 
is there some
pControl->SetLineBreak(); ?
(can't find anything in the manual)



Replies:
Posted By: Tsenoh
Date Posted: 12 January 2007 at 10:36am
Normally, Ribbon can hold three rows of controls. Maybe is your Textbox a bit larger than the buttons. Try making your groups bigger to make place for your controls. Use CXTPRibbonBar::SetGroupsHeight(int nHeight).
 
Hope it helps.
 
Sincerely,
 
Bojan Hrnkas


Posted By: Tsenoh
Date Posted: 12 January 2007 at 10:40am
P.S. If you want to start a new column in a group, even if there is enough place in the current column, you can use CXTPControl::SetBeginGroup.


Posted By: dandan
Date Posted: 15 January 2007 at 4:10am
good morning :-)
--
yes, but it doesnt show up in the next row, it still floats around like the other buttons (means: on large window-> two rows, on small windows -> three rows) - but i need statically three rows
--
thx


Posted By: Tsenoh
Date Posted: 15 January 2007 at 6:46am
I don't understand how come it is in three rows when the window is small, and in two when maximized. The height of the ribbon bar is the same, uninfluenced by the size of the window. Normally, if it has enough space it will display in as much rows as possible. Try increasing the height of the RibbonBar by larger number of pixels and see what happens. (For instance SetGroupsHeight(200); )


Posted By: dandan
Date Posted: 15 January 2007 at 10:49am
thanks, but that doesn't change anything (as i expected..)
 
the standard-behaviour of a ribbon-group is: use as much width as possible (not height) - so it comes that it uses two rows ("Zeilen" in german) on large windows and three in small windows (as i want it)
 
here are the graphics:
 
the left image looks just ugly, i need a possibility to have it always compact like in the right window
 
Code behind:
CXTPRibbonGroup* pGroupMonate = pTabTest->AddGroup(ID_GROUP_MONATE);
pGroupMonate->SetControlsGrouping(); // nice horz. grouping
pGroupMonate->ShowOptionButton(); // optionbutton
pGroupMonate->Add(xtpControlButton, ID_MONAT_1)->SetBeginGroup(TRUE);
pGroupMonate->Add(xtpControlButton, ID_MONAT_2);
pGroupMonate->Add(xtpControlButton, ID_MONAT_3);
pGroupMonate->Add(xtpControlButton, ID_MONAT_4);
pGroupMonate->Add(xtpControlButton, ID_MONAT_5);
pGroupMonate->Add(xtpControlButton, ID_MONAT_6);
pGroupMonate->Add(xtpControlButton, ID_MONAT_7)->SetBeginGroup(TRUE);
pGroupMonate->Add(xtpControlButton, ID_MONAT_8);
pGroupMonate->Add(xtpControlButton, ID_MONAT_9);
pGroupMonate->Add(xtpControlButton, ID_MONAT_10);
pGroupMonate->Add(xtpControlButton, ID_MONAT_11);
pGroupMonate->Add(xtpControlButton, ID_MONAT_12);
CXTPControlEdit* pControlEdit = (CXTPControlEdit*)pGroupMonate->Add(xtpControlEdit, ID_JAHRESAUSWAHL);
pControlEdit->SetBeginGroup(TRUE);
pControlEdit->SetStyle(xtpButtonIconAndCaption);
pControlEdit->SetWidth(120);
pControlEdit->ShowSpinButtons();
 
also a decreased size of the buttons or spinbuttons does not change the behaviour.


Posted By: dandan
Date Posted: 18 January 2007 at 3:52am
good morning :-)
 
-> i still need a linebreak for my ribbons
 
changing the height of the ribbonbar does not change anything, nor smaller buttons - they are still floating around.
 
thanks :-)


Posted By: mgampi
Date Posted: 22 March 2011 at 10:14am
Hi;
have you ever solved this?
Give me a hint!


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



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