Print Page | Close Window

Block the drag/float of CommandBar

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


Topic: Block the drag/float of CommandBar
Posted By: gibra
Subject: Block the drag/float of CommandBar
Date 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



Replies:
Posted By: Aaron
Date 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....


Posted By: jpbro
Date 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



Posted By: jpbro
Date 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



Posted By: Aaron
Date 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....


Posted By: gibra
Date 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



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