Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Ribbon Control  "LineBreak"
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon Control "LineBreak"

 Post Reply Post Reply
Author
Message
dandan View Drop Down
Newbie
Newbie
Avatar

Joined: 05 January 2007
Location: Austria
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote dandan Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon Control "LineBreak"
    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)
Back to Top
Tsenoh View Drop Down
Groupie
Groupie
Avatar

Joined: 08 November 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tsenoh Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Tsenoh View Drop Down
Groupie
Groupie
Avatar

Joined: 08 November 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tsenoh Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
dandan View Drop Down
Newbie
Newbie
Avatar

Joined: 05 January 2007
Location: Austria
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote dandan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Tsenoh View Drop Down
Groupie
Groupie
Avatar

Joined: 08 November 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tsenoh Quote  Post ReplyReply Direct Link To This Post 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); )
Back to Top
dandan View Drop Down
Newbie
Newbie
Avatar

Joined: 05 January 2007
Location: Austria
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote dandan Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
dandan View Drop Down
Newbie
Newbie
Avatar

Joined: 05 January 2007
Location: Austria
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote dandan Quote  Post ReplyReply Direct Link To This Post 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 :-)
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.266 seconds.