Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - [SOLVED] Non square icons in TearOffPopupBar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] Non square icons in TearOffPopupBar

 Post Reply Post Reply
Author
Message
Peter59 View Drop Down
Groupie
Groupie


Joined: 19 July 2007
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote Peter59 Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] Non square icons in TearOffPopupBar
    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

Thanks, Peter
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
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: 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
Back to Top
Peter59 View Drop Down
Groupie
Groupie


Joined: 19 July 2007
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote Peter59 Quote  Post ReplyReply Direct Link To This Post 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

Peter


Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
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.