void wxComboCtrl::OnResize() { // // Recalculates button and textctrl areas int textCtrlXAdjust; int textCtrlYAdjust; #if wxUSE_UXTHEME if ( wxUxThemeEngine::GetIfActive() ) { textCtrlXAdjust = TEXTCTRLXADJUST_XP; textCtrlYAdjust = TEXTCTRLYADJUST_XP; } else #endif { textCtrlXAdjust = TEXTCTRLXADJUST_CLASSIC; textCtrlYAdjust = TEXTCTRLYADJUST_CLASSIC; } // Technically Classic Windows style combo has more narrow button, // but the native renderer doesn't paint it well like that. int btnWidth = 17; CalculateAreas(btnWidth); // Position textctrl using standard routine PositionTextCtrl(textCtrlXAdjust,textCtrlYAdjust); }
void wxComboCtrl::OnResize() { // // Recalculates button and textctrl areas // Technically Classic Windows style combo has more narrow button, // but the native renderer doesn't paint it well like that. int btnWidth = FromDIP(17); CalculateAreas(btnWidth); // Position textctrl using standard routine PositionTextCtrl(); }
void wxGenericComboCtrl::OnResize() { // Recalculates button and textctrl areas CalculateAreas(DEFAULT_DROPBUTTON_WIDTH); #if 0 // Move separate button control, if any, to correct position if ( m_btn ) { wxSize sz = GetClientSize(); m_btn->SetSize( m_btnArea.x + m_btnSpacingX, (sz.y-m_btnSize.y)/2, m_btnSize.x, m_btnSize.y ); } #endif // Move textctrl, if any, accordingly PositionTextCtrl( TEXTCTRLXADJUST ); }