BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-23-2009, 08:56 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2009
Model: 8130
PIN: N/A
Carrier: don't know
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy drawFocus() issue

Please Login to Remove!

Hi,

I am new to BlackBerry Development. I have created a custom Grid Manager which extends VerticalFieldManager and for each row, i have created a HorizontalFieldManager.

Now on navigating rows, i want to highlight the entire row. For this, i have overridden drawFocus() of HorizontalFieldManager but it never gets called even if i set HorizontalFieldManager as a FOCUSABLE Field.

Any one has an idea that we can override drawFocus() of Manager or not??
Offline  
Old 03-11-2010, 05:51 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2010
Model: N/A
PIN: N/A
Carrier: Fledge
Posts: 43
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Vidhi,

A manager itself cannot be focusable. What you can do is override the paint method of the manager.

Code:
protected void paint(Graphics g) {
  if (getLeafFieldWithFocus() != null) {
    //Here you could change the background color, etc
  }
}
I prefer to extend Field rather than Manager for my "focusable rows" and then I just override the paint and layout methods. This way you can use change listeners, isFocus(), etc.
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

Allen Bradley 1771-OFE1 B Q01 Rev B Analog 12 Bit Voltage Output Module 1771OFE1
$49.99
Allen Bradley 1771-OFE1 B Q01 Rev B Analog 12 Bit Voltage Output Module 1771OFE1 pictureSMC VXD2140 Solenoid Valve, Coil Voltage: 110/120VAC, Orifice: 15mm, 1/2" NPT
$38.0
SMC VXD2140 Solenoid Valve, Coil Voltage: 110/120VAC, Orifice: 15mm, 1/2Hyundai Low Voltage Inverter N700E 037Hf 3 Phase
$20.0
Hyundai Low Voltage Inverter N700E 037Hf 3 Phase picture800KV 2cm Super Arc 6V-12V Stable Inverter Pulse High-Voltage Generator
$2.99
800KV 2cm Super Arc 6V-12V Stable Inverter Pulse High-Voltage Generator pictureKlein Insulated Tools High Voltage 8 Piece Set Never Used
$275.0
Klein Insulated Tools High Voltage 8 Piece Set Never Used picture






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