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 » how to restrict the resizing of the control bar Collapse All
Subject Author Date
Sungsoo Yoon Jan 25, 2006 - 5:54 AM

<TABLE style="BORDER-TOP: #aaaaaa 2px solid; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=6 width="100%" border=0>
<TBODY>
<TR>
<TD id=_ctl0_tdFullMessageText colSpan=3>


<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=4 width="100%" border=0>
<TBODY>
<TR>
<TD class=forum_line3 id=_ctl0_MessageText>

Dear Pro-UIS


I found here What I really want to know, but I am beginner so I can not implement your words.


Please, give me more detail explanation.


I would like to use the second method(container window).


The following is your answer to somebody’s question


I always appreciate your assistance.


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


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.

</TD></TR></TBODY></TABLE>
</TD></TR>
<TR>
<TD>
</TD>
<TD noWrap>Technical Support</TD>
<TD noWrap>Sep 29, 2004 - 10:33 AM</TD></TR>
<TR>
<TD id=_ctl1_tdFullMessageText style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px" colSpan=3>

<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=4 width="100%" border=0>
<TBODY>
<TR>
<TD class=forum_line3 id=_ctl1_MessageText>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.
    <LI>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.
</TD></TR></TBODY></TABLE>
</TD></TR></TBODY></TABLE>

Technical Support Jan 26, 2006 - 11:48 AM

Please use the CExtControlBar-derived class as the parent of your resizable dialog window:

class CMyBar : public CExtControlBar
{
public:
    virtual INT _CalcDesiredMinHW() const
    {
        return 400; // width
    }
    virtual INT _CalcDesiredMinVH() const
    {
        return 400; // height
    }
};
That will restrict the size of the bar to 400x400 (pixels) in the most cases where size restriction is acceptable.

Sungsoo Yoon Jan 26, 2006 - 8:45 PM

Thank so much.


I always appreciate your assistance.


That’s good working.


ps)Please add much more thing like this to help document in the next version.

Technical Support Jan 27, 2006 - 10:52 AM

We we have a collection of internal virtual methods in the CExtControlBar class which can be used for customizing the control bar behavior. Potentially all of them can be converted into public and documented methods but all these methods change the Visual Studio .NET/2005 resizable bar behavior and make the behavior user defined and special for a particular application.