Print Page | Close Window

RibbonGroup Fixed Size

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=13595
Printed Date: 07 October 2024 at 4:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: RibbonGroup Fixed Size
Posted By: TShriver
Subject: RibbonGroup Fixed Size
Date Posted: 05 March 2009 at 7:25pm
Hello,
 
I'm trying to accomplish the same effect as demostrated in the RibbonSample whereby the RibbonGroup "Paragraph" shown below does not expand is size when the form is enlarged.
 
 
As you can see from my attempt below in the RibbonGroup "Alerts" the size of the group is fine until the form is resized.
 
 
When I enlarge the form, the RibbonGroup expands to fill the extra space available.  I'd like it to remain as above.
 
 
Thank you!
 
Tim



Replies:
Posted By: Oleg
Date Posted: 06 March 2009 at 2:01am
Hi,
 
Add
pControl->SetStyle(xtpButtonCaption);
for top labels.


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


Posted By: TShriver
Date Posted: 09 March 2009 at 2:48pm
When will the previous post be made public?
 
"thank you, but I have the control style set "Control.Style = xtpButtonCaption" which is just as in the RibbonSample App.  Here is my code:
 
 
174    Set GroupAlerts = TabHome.Groups.AddGroup("Alerts", ID_GROUP_ALERT)
176    Set Control = GroupAlerts.Add(xtpControlLabel, 0, "KWH")
178    Control.Style = xtpButtonCaption
 
          Dim ControlEdit As CommandBarEdit
180    Set ControlEdit = GroupAlerts.Add(xtpControlEdit, ID_KWH_ALERT_UP, "     Up:")
182    ControlEdit.Width = 120
184    ControlEdit.ShowSpinButtons = True
186    ControlEdit.Text = g_lKWHAlert_up
  
188    Set ControlEdit = GroupAlerts.Add(xtpControlEdit, ID_KWH_ALERT_DOWN, "Down:")
190    ControlEdit.Width = 120
192    ControlEdit.ShowSpinButtons = True
194    ControlEdit.Text = g_lKWHAlert_down
 
196    Set Control = GroupAlerts.Add(xtpControlLabel, 0, "Voltage")
198    Control.Style = xtpButtonCaption
200    Control.BeginGroup = True
   
202    Set ControlEdit = GroupAlerts.Add(xtpControlEdit, ID_VOLTAGE_ALERT_UP, "     Up:")
204    ControlEdit.Width = 120
206    ControlEdit.ShowSpinButtons = True
208    ControlEdit.Text = g_lVoltageAlert_up
  
210    Set ControlEdit = GroupAlerts.Add(xtpControlEdit, ID_VOLTAGE_ALERT_DOWN, "Down:")
212    ControlEdit.Width = 120
214    ControlEdit.ShowSpinButtons = True
216    ControlEdit.Text = g_lVoltageAlert_down"


Posted By: Oleg
Date Posted: 10 March 2009 at 1:57am
Hi,
 
Then add
Control.Style = xtpButtonIconAndCaption for all Edit.


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


Posted By: TShriver
Date Posted: 10 March 2009 at 9:43am
Oleg,
 
Thank you!  That was the solution.  ControlEdit.Style = xtpButtonIconAndCaption for all items.
 
Best,
 
Tim



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