[ 1572220 ] Show popup when wxComboCtrl image area clicked

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-10-08 15:59:53 +00:00
parent cb62a16afb
commit 1efad474fd
4 changed files with 24 additions and 27 deletions

View File

@@ -280,11 +280,10 @@ void wxGenericComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
void wxGenericComboCtrl::OnMouseEvent( wxMouseEvent& event )
{
bool isOnButtonArea = m_btnArea.Contains(event.m_x,event.m_y);
int mx = event.m_x;
bool isOnButtonArea = m_btnArea.Contains(mx,event.m_y);
int handlerFlags = isOnButtonArea ? wxCC_MF_ON_BUTTON : 0;
// Preprocessing fabricates double-clicks and prevents
// (it may also do other common things in future)
if ( PreprocessMouseEvent(event,handlerFlags) )
return;
@@ -301,8 +300,11 @@ void wxGenericComboCtrl::OnMouseEvent( wxMouseEvent& event )
}
else
{
if ( isOnButtonArea || HasCapture() )
if ( isOnButtonArea || HasCapture() ||
(m_widthCustomPaint && mx < (m_tcArea.x+m_widthCustomPaint)) )
{
handlerFlags |= wxCC_MF_ON_CLICK_AREA;
if ( HandleButtonMouseEvent(event,handlerFlags) )
return;
}