BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 06-13-2007, 09:16 PM   #1 (permalink)
Knows Where the Search Button Is
Join Date: May 2007
Model: 8800
Carrier: Rogers
Posts: 17
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Determine current selection in ListFieldCallback.drawListRow()

Please Login to Remove!

I am trying to use a ListFieldCallback to do some interesting text colouring (multiple colours in a single row).

One thing I can't seem to figure out is when the currently requested row is the highlighted row. Calling getSelectedIndex() doesn't help at all. Can anybody suggest a better idea?

public void drawListRow(ListField lf,Graphics g,int i,int y,int w)
  if ( getSelectedIndex() != i ) {
    g.setColor( Color.BLUE );
  graphics.drawText( "hi", 0, y );

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.