Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - xtpButtonIconAndCaption icon size problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

xtpButtonIconAndCaption icon size problem

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

Joined: 11 February 2008
Location: Portugal
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote foleypt Quote  Post ReplyReply Direct Link To This Post Topic: xtpButtonIconAndCaption icon size problem
    Posted: 10 March 2008 at 2:03pm
I have a toolbar which is set with icons at size 24x24  but I want one control to have icon at 16x16 and a caption below.

I use control.Style = xtpButtonIconAndCaptionBelow, but I find with this style I end up with an icon 24x24 EVEN if I set the icon in question and all the other icons to 16x16, this has the affect of making the whole toolbar higher

How can I set the icon to 16x16? I link to a zipped up example project exhibiting the problem

http://services.beacon-dodsworth.co.uk/iconsize_problem.zip

Dim toolbar As CommandBar
Dim control As CommandBarControl

Set toolbar = CommandBars.Add("MyToolbar", xtpBarTop)

CommandBars.ActiveMenuBar.Visible = False

CommandBars.Icons = ImageManager1.Icons

toolbar.SetIconSize 24, 24
'toolbar.SetIconSize 16, 16

toolbar.Controls.Add xtpControlButton, 100, ""
Set control = toolbar.Controls.Add(xtpControlButton, 101, "my button")
toolbar.Controls.Add xtpControlButton, 102, ""

control.Style = xtpButtonIconAndCaptionBelow
control.SetIconSize 16, 16
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: 10 March 2008 at 4:17pm
Hi,
 
Yes xtpButtonIconAndCaptionBelow always use icon size defined as "Large" icon size.
as workaround afd this line:
 
CommandBars.Options.SetIconSize True, 16, 16
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
foleypt View Drop Down
Groupie
Groupie
Avatar

Joined: 11 February 2008
Location: Portugal
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote foleypt Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2008 at 6:54pm
Thanks Oleg,

That does produce the affect I want, however what are the implications of setting this option?

I set the iconsize for each control and commandbar elsewhere in the menus and toolbars but I seem to remember that some of the codejock controls will reference off this large icon setting size and so will hence appear at 16x16 not say the perhaps desired 24x24?

Are you planning on altering this behaviour of xtpButtonIconAndCaptionBelow?

Could you advise me as to the implications of setting the workaround?
Back to Top
Dieter View Drop Down
Groupie
Groupie


Joined: 22 July 2006
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dieter Quote  Post ReplyReply Direct Link To This Post Posted: 26 March 2008 at 11:40am
Hi,

I have a similar problem, but I use Visual C++/MFC Xtreme Toolkit Pro:

My application has a toolbar in a client window and I needed text below the icons.
I tested the style xtpButtonIconAndCaptionBelow and set the icon size with SetIconSize(CSize(16, 16));
But the icons were still large and the caption used two lines.

So I searched in the samples and found the following line in the HelpContext-Sample:
pCommandBars->GetCommandBarsOptions()->bShowTextBelowIcons = TRUE;

Now the icons are small, the text is below the icons and the caption has only one line.

Maybe there is a similar setting in the ActiveX-Control?


Oleg,
Is the behaviour (large icons, caption has two lines) of xtpButtonIconAndCaptionBelow and SetIconSize(CSize(16, 16))
working as designed or is this an error. 

With GetCommandBarsOptions()->bShowTextBelowIcons everything is much better!

Dieter

Product: Xtreme ToolkitPro version 15.2.1
Platform: Windows XP (32bit) - SP 3
Language: Visual C++ 6.0, Visual Studio 2010
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.234 seconds.