xtpButtonIconAndCaption icon size problem |
Post Reply |
Author | |
foleypt
Groupie Joined: 11 February 2008 Location: Portugal Status: Offline Points: 10 |
Post Options
Thanks(0)
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
foleypt
Groupie Joined: 11 February 2008 Location: Portugal Status: Offline Points: 10 |
Post Options
Thanks(0)
|
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? |
|
Dieter
Groupie Joined: 22 July 2006 Status: Offline Points: 15 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |