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 » Fixed-width toolbars Collapse All
Subject Author Date
locke cole Jun 28, 2004 - 7:44 AM

Hi again, I’m using a CExtControlBar with my own control embedded in it using CExtWRB
Now I’d like to make the toolbar a fixed width, but still allow the user to change the height. Is there any way of doing this? I’m not sure where to look.
Thanks very much in advance
--
Jan

C. Troy Popplewell Nov 2, 2006 - 4:17 PM

Jan, can you please explain how you were able to only allow docking on the left and right? Also, did you find an easy way to fix the horizontal width of your toolbar?

Technical Support Nov 3, 2006 - 11:55 AM

When initializing toolbars, you can specify the side of the frame window for docking:

wndToolBar.EnableDocking( CBRS_ALIGN_LEFT|CBRS_ALIGN_RIGHT );


Technical Support Jun 28, 2004 - 10:30 AM

Dear Jan,

Thank you for an interesting question.

Prof-UIS supports both Visual Studio .NET-like resizable panels (the CExtControlBar class) and fixed-size toolbars (the CExtToolControlBar class). The resizable panel is designed to be a fully resizable and redockable window with support for the autohide feature. You cannot limit resizing of a particular panel because it may be docked in a single row/column with other fully resizable panel(s). The toolbar window does not support resizing because its size is determined by the size of its buttons. The CExtPanelControlBar class is derived from CExtToolControlBar and implements a fixed-size panel which keeps only one child window (usually a child dialog) and can be docked in the same outer areas as toolbars and the menu bar. The CExtPanelControlBar class adjust its size according to the size of its single child window. It does not support any kind of resizing at all.



In the MS Office XP and 2003 applications you can see several resizable and redockable windows like the Task Area panel. They always occupy a full row/column. They can be resized only horizontally when docked at left/right or vertically when docked at top/bottom. It is possible to code such dockable panel by creating your own class derived from the CExtControlBar class. The FixedSizePanels sample demonstrates how to do this.

locke cole Jul 1, 2004 - 3:54 AM

I understand your point about resizing and docking, so I’ve set the window to only allow docking on the left and right of the screen.

Could you give an example of what functions to override in the CExtControlBar class to fix horizontal resizing, but allow vertical resizing?
The FixedSizePanels sample shows an override of CExtControlBar, but it doesn’t show how to get different resizing behaviour.
(The sample also shows how to use CExtPanelControlBar classes, but like you say those don’t resize at all)

Thanks for all the help!

Technical Support Jul 1, 2004 - 9:23 AM

Dear Jan,

To control the horizontal resizing of vertically docked bars and vertical resizing of horizontally docked bars, you need to examine and completely rewrite the following internal virtual methods of the CExtControlBar class:

virtual void _RowResizingStart();
virtual void _RowResizingStop( bool bCancel );
virtual void _RowResizingUpdateState();
These methods are responsible for resizing one horizontal row or vertical column that has at least one control bar.


To control the horizontal resizing of one horizontally docked bar and vertical resizing of one vertically docked bar, you need to completely rewrite the following internal virtual methods:
virtual void _RowRecalcingStart();
virtual void _RowRecalcingStop( bool bCancel );
virtual void _RowRecalcingUpdateState();
virtual bool _RowRecalcing_IsBottomEnabled();
virtual bool _RowRecalcing_IsTopEnabled();