![]() |
Preventing TearOff Popup from docking |
Post Reply ![]() |
Author | |
markh ![]() Groupie ![]() Joined: 12 November 2003 Location: United Kingdom Status: Offline Points: 49 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
check CustomThemes sample...
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
markh ![]() Groupie ![]() Joined: 12 November 2003 Location: United Kingdom Status: Offline Points: 49 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
markh ![]() Groupie ![]() Joined: 12 November 2003 Location: United Kingdom Status: Offline Points: 49 |
![]() ![]() ![]() ![]() ![]() |
Any more info on this one??
I still don't seem to be able to prevent a TearOff popup from docking.
Thanks
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
markh ![]() Groupie ![]() Joined: 12 November 2003 Location: United Kingdom Status: Offline Points: 49 |
![]() ![]() ![]() ![]() ![]() |
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??
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |