Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Preventing TearOff Popup from docking
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Preventing TearOff Popup from docking

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


Joined: 12 November 2003
Location: United Kingdom
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote markh Quote  Post ReplyReply Direct Link To This Post Topic: Preventing TearOff Popup from docking
    Posted: 27 February 2007 at 9:16am
Hello
 
Just wondered if there was a way of preventing a TearOff popup from docking once it has been torn off? I have tried calling:
 
EnableDocking(XtremeCommandBars::xtpFlagFloating);
 
for the CommandBar of the popup on creation. However, this doesn't seem to work. It does seem to work if the toolbars are saved and reloaded next time the app starts but only if the TearOff was visible when the toolbars were saved.
 
There is also another interesting issue. When the TearOff is originally torn off, the floating window has the graduated fill of the specified VS 2005 theme. However, when it is reloaded it has a plain fill. This only occurs if the above EnableDocking is called after loading. See images:
 
After initial tearing off
 
After Save and Reload
 
Any help appreciated.
 
Mark
 
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: 27 February 2007 at 9:50am
Hi,
 
check CustomThemes sample...
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
markh View Drop Down
Groupie
Groupie


Joined: 12 November 2003
Location: United Kingdom
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote markh Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2007 at 10:39am
 
Hello Oleg
 
What is the CustomThemes sample? I don't see one.
 
In fact the only sample that seems to have a call to SetTearOffPopup is the Office 2003 sample. This however, does allow the torn off popup to dock to any position.
 
If I add the line:
 
ControlColorPopup.CommandBar.EnableDocking xtpFlagFloating
 
after
 
ControlColorPopup.CommandBar.SetTearOffPopup "Colors", IDR_COLORSBAR, 150
 
it still allows me to dock the TearOff to any location.
Back to Top
markh View Drop Down
Groupie
Groupie


Joined: 12 November 2003
Location: United Kingdom
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote markh Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2007 at 6:04pm
Any more info on this one??
 
I still don't seem to be able to prevent a TearOff popup from docking.
 
Thanks
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: 07 March 2007 at 5:04am
Sorry, was answer for MFC users, didn't check forum.
hmm in ActiveX version there is no event when new tearoff bar was created.
 
try to catch ToolBarVisibleChanged event, check toolbar's BuiltIn property and set its EnableDocking
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
markh View Drop Down
Groupie
Groupie


Joined: 12 November 2003
Location: United Kingdom
Status: Offline
Points: 49
Post Options Post Options   Thanks (0) Thanks(0)   Quote markh Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2007 at 7:27am
Just tried this.
 
Unfortunately, the ToolBarVisibleChanged event does not seem to be called at all when the when I tearoff the popup. It only seems to be called when I subsequently close the floating tearoff bar using the X button.
 
Also, the BuiltIn property is always false for the tearoff bar, although this doesn't make any difference since the event isn't called anyway.
 
Any other ideas??
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: 07 March 2007 at 7:44am

Hi,

Afriad only one idea - monitor Count of CommandBars in Update event - if changed - check if it is tearoff bar (BuiltIn property have to be False for this bar) and change its docking. Quite weird but will work.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.045 seconds.