Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Block the drag/float of CommandBar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Block the drag/float of CommandBar

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


Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 288
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Topic: Block the drag/float of CommandBar
    Posted: 25 September 2010 at 4:52pm
I have a CommandBars control, named CB.
Then I create a toolbar as code below
 
    Dim cToolbar As CommandBar
    With CB
        .DeleteAll
        .VisualTheme = xtpThemeRibbon
        .EnableCustomization False
        .Options.ShowExpandButtonAlways = False
        .Icons.LoadBitmap gsIcons16x16, gaArray16x16, XtremeCommandBars.XTPImageState.xtpImageNormal
        Set cToolbar = .Add("Toolbar", xtpBarTop)
    End With
    With cToolbar
        .SetIconSize 16, 16
        .ShowGripper = False
        .Customizable = False
    End With

I don't want that the user drag and/or float out the toolbar, cToolbar should be blocked.
But I don't find a property for this.
 
How do?
 
Thank.
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8
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: 26 September 2010 at 3:11am

Hi,

Set  .EnableDocking to some flag...
 
With cToolbar
        ...
        .EnableDocking xtpFlagStretchedShared / xtpFlagHideWrap / xtpFlagStretched
 
 
 
 
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
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 26 September 2010 at 6:20pm
The only problem is that even though the toolbar is no longer draggable, the mouse icon still changes to the four-way arrow icon. Unless there is a way to prevent this?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 26 September 2010 at 6:23pm
Duh- found the answer in my own code ;)

Use .EnableDocking 0 to get rid of the icon.


Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

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: 27 September 2010 at 1:30am
Originally posted by jpbro jpbro wrote:

The only problem is that even though the toolbar is no longer draggable, the mouse icon still changes to the four-way arrow icon. Unless there is a way to prevent this?
 
Hi,
 
If you only set one of the options I mentioned, the drag icon doesn't appear. As long as you don't set a "draggable flag" (xtpAligntop etc etc) the icon doesn't show. Well, easy way seems to be  .EnableDocking 0 Wink 
 
This one is for support: If you want the toolbars on same "row" you have to set .EnableDocking xtpFlagStretchedShared, right? Why isn't the second toolbar docked on same row? I had to dock it myself, is this by design?
 
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
gibra View Drop Down
Senior Member
Senior Member


Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 288
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Posted: 05 October 2010 at 1:24pm
.EnableDocking xtpFlagStretched
is perfect for me. Wink
 
Thank Tongue
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8
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.188 seconds.