223 |
223 |
224 listBox->SetListBoxObserver(this); |
224 listBox->SetListBoxObserver(this); |
225 |
225 |
226 // Set the current "pushed in" indication |
226 // Set the current "pushed in" indication |
227 if ( iCurrentSelectionIndex != -1 ) |
227 if ( iCurrentSelectionIndex != -1 ) |
228 listBox->View()->SelectItemL( iCurrentSelectionIndex ); |
228 { |
|
229 // |
|
230 // SelectItemL make the view item drawn by default, SetDisableRedraw can remove flick |
|
231 // |
|
232 TBool bRedrawDisabled = listBox->View()->RedrawDisabled(); |
|
233 listBox->View()->SetDisableRedraw( ETrue ); |
|
234 |
|
235 listBox->View()->SelectItemL( iCurrentSelectionIndex ); |
|
236 listBox->View()->SetDisableRedraw( bRedrawDisabled ); |
|
237 } |
229 |
238 |
230 // Set the scroller indication off |
239 // Set the scroller indication off |
231 listBox->CreateScrollBarFrameL(ETrue); |
240 listBox->CreateScrollBarFrameL(ETrue); |
232 listBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EOff); |
241 listBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EOff); |
233 |
242 |
234 // Need to do this to set up the scroll bar model |
243 // Need to do this to set up the scroll bar model |
235 listBox->UpdateScrollBarsL(); |
244 listBox->UpdateScrollBarsL(); |
236 |
245 |
237 if(!IsBackgroundDrawingEnabled()) |
246 if(!IsBackgroundDrawingEnabled()) |
238 listBox->ScrollBarFrame()->DrawBackground(EFalse, EFalse); |
247 { |
|
248 listBox->ScrollBarFrame()->DrawBackground(EFalse, EFalse); |
|
249 } |
239 |
250 |
240 |
251 |
241 // Force a size changed |
252 // Force a size changed |
242 SizeChanged(); |
253 SizeChanged(); |
243 |
254 |