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 » Restricting the resizing of CExtControlBar Collapse All
Subject Author Date
Ken Knapton Sep 28, 2004 - 7:02 PM

Hi,


I’ve run into a problem using CExtControlBar.  I have a dialog inside the control bar as the only child, and that dialog inherits from CExtResizableDialog.  I have several items anchored in the dialog, some are right justified and some left justified.  The problem is that when i shrink the control bar, the buttons that are anchored overrun each other.  Is there a way to restrict the resizing of the control bar?  I’ve already set the MINMAX info of the CExtResizableDialog using the SetMinTrackSize method.


Any assistance would be appreciated.


Thank you.

Technical Support Sep 29, 2004 - 10:33 AM

Dear Ken,

The CExtControlBar class implements a fully resizable Visual Studio .NET - like panel. You cannot limit its minimum size because this breaks the algorithms for calculating mutual positions of the control bars both inside the main frame, and inside complex floating palettes. We think you may decide on one of the following solutions:

  1. Assign proportional anchors to the dialog controls. This will make each control have a size dependent on the total size of the dialog. This approach should allow you to avoid overrunning controls by each other.
  2. Insert some container window into the control bar and insert your dialog into this container. The container window should resize the child dialog in a way to fill all its client area. If the size of the container’s client area is less than some minimum size, then it should prevent the dialog from having a too small size and possibly to implement scrolling features. We can help you code this feature.


Ken Knapton Oct 27, 2004 - 4:43 PM

I used the second method and it worked great.


Thank you!