Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Ribbon Non Breaking Caption. How to?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon Non Breaking Caption. How to?

 Post Reply Post Reply
Author
Message
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon Non Breaking Caption. How to?
    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)

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post 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)

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.109 seconds.