Print Page | Close Window

[SOLVED] Non square icons in TearOffPopupBar

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=17923
Printed Date: 06 October 2024 at 4:27am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Non square icons in TearOffPopupBar
Posted By: Peter59
Subject: [SOLVED] Non square icons in TearOffPopupBar
Date Posted: 20 February 2011 at 2:42am
Hello,

I added some non square icons (80 x 16) to a command bar set as TearOffPopupBar. When I tear off the popup bar it looks very strange.

      

Can someone give me some advice what I missed?

See attached sample. uploads/3156/SampleSetIconSize.zip - uploads/3156/SampleSetIconSize.zip

Thanks, Peter


-------------
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6



Replies:
Posted By: Aaron
Date Posted: 20 February 2011 at 6:07am

Hi Peter,

Long time no seen Wink

Seems you have to set:
 
With PopupButton.CommandBar
        .ShowGripper = False
        .CommandBars.Options.LargeIcons = True
        .CommandBars.Options.SetIconSize True, 80, 16
        ....
        .SetTearOffPopup "Wide Icons", 33, 80 'To get one 'column'
       
 
to get what you want.
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Oleg
Date Posted: 20 February 2011 at 8:35am
 maybe better solution is to create toolbar that is hidden by default
in case user tearoff your popup he will start drag this toolbar.

 Set ToolBar = CommandBars.Add("Colors", xtpBarTop)
     ToolBar.BarID = 33
     ToolBar.Visible = False

    'PopupButton.CommandBar.SetPopupToolBar True

    With ToolBar
        .ShowGripper = False
        .SetIconSize 80, 16
        .SetTearOffPopup "Wide Icons", 33, 220
        .DefaultButtonStyle = xtpButtonIconAndCaption
    
        Set cmdCtl = .Controls.Add(xtpControlButton, 101, "Blue")
        cmdCtl.IconId = 101
        cmdCtl.SetIconSize 80, 16

        Set cmdCtl = .Controls.Add(xtpControlButton, 102, "Green")
        cmdCtl.IconId = 102
        cmdCtl.SetIconSize 80, 16

        Set cmdCtl = .Controls.Add(xtpControlButton, 103, "Grey")
        cmdCtl.IconId = 103
        cmdCtl.SetIconSize 80, 16
        
        Set cmdCtl = .Controls.Add(xtpControlButton, 104, "Red")
        cmdCtl.IconId = 104
        cmdCtl.SetIconSize 80, 16
        
        Set cmdCtl = .Controls.Add(xtpControlButton, 105, "Yellow")
        cmdCtl.IconId = 105
        cmdCtl.SetIconSize 80, 16
        
    End With


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Peter59
Date Posted: 20 February 2011 at 1:10pm
@Aaron: Thank you for your suggestion and yes, long time no seen, but still in business! Do you think this is a sample for the code snippets forum worth?

@Oleg: Thank you for the "lighting up" idea - now the problem is solved - see attached sample.



uploads/3156/Sample_SetIconSize.zip - uploads/3156/Sample_SetIconSize.zip

Peter




-------------
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6


Posted By: Aaron
Date Posted: 21 February 2011 at 2:00pm
Originally posted by Peter59<FONT color=#333333> Peter59 wrote:

@Aaron: Thank you for your suggestion and yes, long time no seen, but still in business!
Do you think this is a sample for the code snippets forum worth?

[...]

 
Hi Peter,
 
In my opinion every codesnippet is worth posting. There will always be someone looking for same problem, as you encountered, when 'trying' to implement some 'special' feature. Would be nice if all forum members would share there 'knowledge' Wink
 
Thanks
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....



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