summaryrefslogtreecommitdiff
path: root/vcl/source/control/combobox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/control/combobox.cxx')
-rw-r--r--vcl/source/control/combobox.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 49c7e5457da7..f83e46e38302 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -287,6 +287,7 @@ BOOL ComboBox::IsAutocompleteEnabled() const
IMPL_LINK( ComboBox, ImplClickBtnHdl, void*, EMPTYARG )
{
+ ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpSubEdit->GrabFocus();
if ( !mpImplLB->GetEntryList()->GetMRUCount() )
ImplUpdateFloatSelection();
@@ -523,6 +524,7 @@ void ComboBox::ToggleDropDown()
ImplUpdateFloatSelection();
else
mpImplLB->SelectEntry( 0 , TRUE );
+ ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpBtn->SetPressed( TRUE );
SetSelection( Selection( 0, SELECTION_MAX ) );
mpFloatWin->StartFloat( TRUE );
@@ -800,14 +802,8 @@ void ComboBox::DataChanged( const DataChangedEvent& rDCEvt )
long ComboBox::PreNotify( NotifyEvent& rNEvt )
{
- long nDone = 0;
-
- if( ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) && ( rNEvt.GetWindow() == mpImplLB->GetMainWindow() ) )
- {
- mpSubEdit->GrabFocus();
- }
- return nDone ? nDone : Edit::PreNotify( rNEvt );
+ return Edit::PreNotify( rNEvt );
}
// -----------------------------------------------------------------------
@@ -830,6 +826,7 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
ImplUpdateFloatSelection();
if( ( nKeyCode == KEY_DOWN ) && mpFloatWin && !mpFloatWin->IsInPopupMode() && aKeyEvt.GetKeyCode().IsMod2() )
{
+ ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpBtn->SetPressed( TRUE );
if ( mpImplLB->GetEntryList()->GetMRUCount() )
mpImplLB->SelectEntry( 0 , TRUE );
@@ -886,6 +883,10 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
nDone = 0; // don't eat this event, let the default handling happen (i.e. scroll the context)
}
}
+ else if( ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) && ( rNEvt.GetWindow() == mpImplLB->GetMainWindow() ) )
+ {
+ mpSubEdit->GrabFocus();
+ }
return nDone ? nDone : Edit::Notify( rNEvt );
}