Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Toolbar buttons with multiline captions
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Toolbar buttons with multiline captions

 Post Reply Post Reply
Author
Message
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Topic: Toolbar buttons with multiline captions
    Posted: 24 August 2006 at 4:50am
Hello,

is there any way to have multiline text captions shown in a toolbar?

I have a toolbar with both icons and texts displayed (text below icon), but the long, single-line texts make the toolbar buttons differently sized, which is really not a nice visual experience. How to make these buttons equally sized (with their texts displayed under the button)?

Thanks a lot, in advance!

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2006 at 8:57am
Hello,
 
try xtpButtonIconAndCaptionBelow style. See new Samples\CommandBars\GallerySample sample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2006 at 10:31am
Yes, it's much better now, thanks!

So an information for others who may be interested: it means that calling
    m_pXTPToolbar->ShowTextBelowIcons(TRUE);
for the whole toolbar is _not_ the same as calling
    pXTPButton->SetStyle(xtpButtonIconAndCaptionBelow);
for each button in that toolbar.

Toolbar captions are in two rows at most with this approach. I guess there won't be any more lines even if caption will be very-very long, so developers shall e.g. cut the caption with an ellipsis if they need to.
Back to Top
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2006 at 7:22am
Hello,

one additional question about the xtpButtonIconAndCaptionBelow style:
is there any way to make all the toolbar buttons use the same width? Because when I set the above style for my buttons, each button is exactly as wide as it needs to be according to its caption text length. However, my toolbar has several rows of buttons, so the buttons are not lined up below each other correctly (because each of them has a different width) which can be a problem for the clients.
Can I make them all the same width somehow if I use the above button style?

Thanks a lot!
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.172 seconds.