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

SIEMENS 6AV1222-0AC20 SIMATIC PROCESSOR MODULE 6AV12220AC20
$900.0
SIEMENS 6AV1222-0AC20 SIMATIC PROCESSOR MODULE 6AV12220AC20  picture10PCS D8284A Encapsulation:DIP18,CPU System Clock Generator
$33.33
10PCS D8284A  Encapsulation:DIP18,CPU System Clock Generator picture5PCS D8284A Encapsulation:DIP18,CPU System Clock Generator
$20.0
5PCS D8284A  Encapsulation:DIP18,CPU System Clock Generator picture1PCS D8284A Encapsulation:DIP18,CPU System Clock Generator
$5.33
1PCS D8284A  Encapsulation:DIP18,CPU System Clock Generator pictureSiemens 6GK7443-1EX20-0XE0 SIMATIC S7-400 CP443-1 Processor
$1100.0
Siemens 6GK7443-1EX20-0XE0 SIMATIC S7-400 CP443-1 Processor picture






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