Print Page | Close Window

Ribbon Non Breaking Caption. How to?

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=15155
Printed Date: 15 June 2025 at 7:56pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbon Non Breaking Caption. How to?
Posted By: Albert1
Subject: Ribbon Non Breaking Caption. How to?
Date Posted: 11 September 2009 at 3:52am
Hello,
 
in a group of my ribbon I need an icon with caption below. I would like to get the caption in a single line without line break. How can I achieve this result?
I tried different ways:
 
 

        ' 1 standard syntax
        Set gr = Sk.Groups.AddGroup("", 1)
        Set Item = gr.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID_X, "foxy lady")
        Item.Style = xtpButtonIconAndCaptionBelow
        Item.IconId = ID_ICON
       '    
        Set gr = Sk.Groups.AddGroup("", 2)
        Set Item = gr.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID_X, "foxy lady")
        Item.Style = xtpButtonIconAndCaption
        Item.IconId = ID_ICON
         ' 3 set width   
        Set gr = Sk.Groups.AddGroup("", 3)
        Set Item = gr.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID_X, "foxy lady")
        Item.Style = xtpButtonIconAndCaptionBelow
        Item.IconId = ID_ICON
        Item.Width = 200
        ' 4 use underscore
        Set gr = Sk.Groups.AddGroup("", 4)
        Set Item = gr.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ID_X, "foxy_lady")
        Item.Style = xtpButtonIconAndCaptionBelow
        Item.IconId = ID_ICON
 
and this is what I got:
 
 
 
I would like to get  style 4 (I got this using underscore "_" between words) but I noticed sometime underscore is becoming visible (argghhh!).
 
Any suggestion?
TY
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)




Replies:
Posted By: jpbro
Date Posted: 11 September 2009 at 9:33am
Try using the non-breaking space character Chr$(160) instead of the space...so:

"foxy" & Chr$(160) & "lady"

should work (I just tried it with the CJ Ribbon sample and it works for me).


-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Albert1
Date Posted: 11 September 2009 at 10:15am
Great!
 
Thank you.


-------------
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)




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