diff options
Diffstat (limited to 'vcl/source/control/combobox.cxx')
-rw-r--r-- | vcl/source/control/combobox.cxx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 21707d0182f5..1eea72131b86 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -951,7 +951,7 @@ void ComboBox::ImplUpdateFloatSelection() if( nSelect != LISTBOX_ENTRY_NOTFOUND ) { if ( !mpImplLB->IsVisible( nSelect ) ) - mpImplLB->SetTopEntry( nSelect ); + mpImplLB->ShowProminentEntry( nSelect ); mpImplLB->SelectEntry( nSelect, bSelect ); } else @@ -959,7 +959,6 @@ void ComboBox::ImplUpdateFloatSelection() nSelect = mpImplLB->GetEntryList()->GetSelectEntryPos( 0 ); if( nSelect != LISTBOX_ENTRY_NOTFOUND ) mpImplLB->SelectEntry( nSelect, FALSE ); - // mpImplLB->SetTopEntry( 0 ); #92555# Ugly.... mpImplLB->ResetCurrentPos(); } } @@ -1440,6 +1439,13 @@ void ComboBox::SetTopEntry( USHORT nPos ) // ----------------------------------------------------------------------- +void ComboBox::ShowProminentEntry( USHORT nPos ) +{ + mpImplLB->ShowProminentEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); +} + +// ----------------------------------------------------------------------- + USHORT ComboBox::GetTopEntry() const { USHORT nPos = GetEntryCount() ? mpImplLB->GetTopEntry() : LISTBOX_ENTRY_NOTFOUND; @@ -1450,6 +1456,20 @@ USHORT ComboBox::GetTopEntry() const // ----------------------------------------------------------------------- +void ComboBox::SetProminentEntryType( ProminentEntry eType ) +{ + mpImplLB->SetProminentEntryType( eType ); +} + +// ----------------------------------------------------------------------- + +ProminentEntry ComboBox::GetProminentEntryType() const +{ + return mpImplLB->GetProminentEntryType(); +} + +// ----------------------------------------------------------------------- + Rectangle ComboBox::GetDropDownPosSizePixel() const { return mpFloatWin ? mpFloatWin->GetWindowExtentsRelative( const_cast<ComboBox*>(this) ) : Rectangle(); |