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 General Discussion » outline move/resize for tool bars Collapse All
Subject Author Date
Kirby Zhang Jun 14, 2005 - 1:40 PM

When I move a control bar, the default behavior seems to show only the outline of the window while I’m dragging, and recalculates layout when I drop. For tool bar, the window contents are updated *as I drag* and layout recalculated immediately. This is with "show contents while dragging" turned on from the control panel.

How can I get tool bar to show only the outline during dragging, overriding the system setting? My main window is a Direct3D window and takes a good pause to resize.

Technical Support Jun 22, 2005 - 3:45 AM

You are able to reposition the control bar by dragging its title bar and its client area only if you have not created some window inside the control bar. If your control bar has a child window that completely fills its client area, then you can reposition the control bar by dragging only its caption (title bar). Please take a look at the FixedSizePanels sample and try to drag-and-drop two control bars with Internet Explorer controls.

Technical Support Jun 15, 2005 - 4:33 AM

Prof-UIS classes for menu bars, toolbars and control bars have a _IsShowContentWhenDragging virtual method which specifies the way in which the window content is drawn during a drag-and-drop operation. If it returns true, the contents of the window is completely redrawn when you dragging it; otherwise Prof-UIS draws only a drag outline.

For example, in case of toolbars you need to create a class derived from CExtToolControlBar and override this method:

class CMyToolControlBar : public CExtToolControlBar
{
protected:
      virtual bool _IsShowContentWhenDragging() const
      {
            return false;
      }
};

Kirby Zhang Jun 21, 2005 - 11:48 AM

When I do as you suggest, the user can now click and drag *any part* of the control bar to reposition it. I don’t know if this was intended. I want to keep the dragging to the gripper only. Is there a way to do this?