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
PIN: N/A
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?

ex:
Code:
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 );
}
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Heath Zenith SP-2717A regulated High Voltage Power Supply
$19.99
Heath Zenith SP-2717A regulated High Voltage Power Supply pictureArcher Transient Voltage Spike Protection 125V 15A 60HZ Vintage. WAW 23
$0.99
Archer Transient Voltage Spike Protection 125V 15A 60HZ Vintage. WAW 23 picture1x DC 6V-12V 1000V 1500V High-voltage Power Boost Step-up Generator Board Module
$0.01
1x DC 6V-12V 1000V 1500V High-voltage Power Boost Step-up Generator Board Module pictureUltraVolt Model 4C24-N250-NC, High-Voltage DC/DC Power Supply
$70.0
UltraVolt Model 4C24-N250-NC, High-Voltage DC/DC Power Supply  pictureKlein Tools Test Lead Set Replacement Voltage Test Alligator Clip Test Meter Kit
$19.93
Klein Tools Test Lead Set Replacement Voltage Test Alligator Clip Test Meter Kit picture






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