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 » Vertical toolbar question Collapse All
Subject Author Date
Mike Van Duzee Jul 2, 2008 - 5:41 AM

Hello ...



In the StyleEditor Sample application dragging the Standard toolbar from a horizontal to a vertical position, causes the "Preset Styles", "Font Name" and "Font Size" user defined commands (ON_COMMAND(ID_SE_STYLE_LIST, OnSeStyleList), etc.) not to get executed. This issue appears to have been introduced in Prof-UIS 2.7.0 and still exists in 2.8.3.



The CExtBarButton::OnClick appears to be returning early due to the m_bDropDownHT flag being set in CExtBarButton::OnToolHitTest(). Would you not want to process the command if the toolbar is docked vertically?



Thanks.

Technical Support Jul 4, 2008 - 1:18 PM

We are sorry for the delay with this reply. Thank you very much for reporting this issue. To fix it, please update the source code for the following two methods:

CRect CExtBarTextFieldButton::OnInplaceControlCalcRect( const RECT & rcBtnArea ) const
{
      ASSERT_VALID( this );
      if(         m_bVertDocked
            &&    (! GetCtrlVisibleVertically() )
            )
            return CRect( 0, 0, 0, 0 );
CRect rcCtrl( rcBtnArea );
CRect rcControlMarginSizes = OnInplaceControlCalcMarginSizes();
      rcCtrl.DeflateRect(
            rcControlMarginSizes.left,
            rcControlMarginSizes.top,
            rcControlMarginSizes.right,
            rcControlMarginSizes.bottom
            );
      if( IsComboTextField() )
            rcCtrl.right -= GetBar()->PmBridge_GetPM()->GetDropDownButtonWidth( (CObject*)this );
      return rcCtrl;
}

CRect CExtBarTextFieldButton::RectDropDown() const
{
      ASSERT_VALID( this );
      if( ! IsComboTextField() )
            return CRect( 0, 0, 0, 0 );
      if(         m_bVertDocked
            &&    (! GetCtrlVisibleVertically() )
            )
            return CRect( 0, 0, 0, 0 );
CRect rcTBB = Rect();
CRect rcTextField =
            OnInplaceControlCalcRect( rcTBB );
CRect rcButton(
            rcTextField.right,
            rcTBB.top,
            rcTBB.right,
            rcTBB.bottom
            );
      return rcButton;
}