Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Prevent floating Collapse All
Subject Author Date
Thomas Maurer Oct 5, 2005 - 10:54 AM

Hello


I am afraid this was asked and answered a thousand times but I couldn’t find it in the forums. How can I prevent a toolbar from floating?


Thanks


Thomas


 

Thomas Maurer Dec 16, 2005 - 3:19 PM

While the answer from Tech Support was correct it did not fully apply to my situation. If you have more than one control bar tabbed into one "container control bar" and you want to restrict certain things on that then you will have to derive a class from CExtDynamicTabbedControlBar and apply certain restrictions there. However, if you want to set the initial size of this bar you will have to do it in one of the tabbed control bars.


Attention: You will have to include a file from the source directory (which is very ugly in my opinion): ..\Src\ExtControlBarTabbedFeatures.h


General comment: If you try to rely on the documentation you will end up asking Tech Support questions all the time. I have used many features (classes, methods) so far that were not in the Reference Manual. I learned a lot by studying the sources and stepping through their code with the debugger.


 


 

Dmitriy Dashevskiy Oct 24, 2005 - 1:41 AM

This does not work well when dragging/dropping bar previously docked in tabbed container. Bar is removed from tab container on drag start but is not created on drop (if dropping in place where it should become floating). What should be changed to cover this case as well?

Thomas Maurer Dec 16, 2005 - 3:10 PM

It’s a little bit late to answer that one but I do it for future generations ;-)


You can prevent dragging by overriding _DraggingStart in your Control Bar and doing nothing in it.

Technical Support Oct 24, 2005 - 12:43 PM

The solution we advised in the previous message relats to the toolbar/menu bar only. We have already resolved the "prevent floating", "prevent closing", "prevent resizing" issues in Prof-UIS 2.50. Please contact us by e-mail so we can provide you with instructions on how to download this update.

Technical Support Oct 5, 2005 - 12:41 PM

You can create the following version of the Prof-UIS toolbar that never gets floating:

class CYourToolBar : public CExtToolControlBar
{
public:
    virtual void FloatControlBar(
        CPoint ptFloat,
        DWORD dwStyle = CBRS_ALIGN_TOP
        )
    {
        ptFloat;
        dwStyle;
    }
};
If you use the CYourToolBar class instead of CExtToolControlBar, then you will be able to drag-and-drop your toolbars only onto the positions near the main frame window borders only.