BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-29-2008, 04:45 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2008
Model: 8820
PIN: N/A
Carrier: at&t
Posts: 40
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question How to turn off select highlight on LabelField

Please Login to Remove!

When I focus on a LabelField, it becomes "highlighted". Is there a simple way to turn that off, so it looks the same with and without focus?

I have tried overriding paint and changing the background color, but this doesn't work at all.

Not sure what to do, or how to use HIGHLIGHT_FOCUS.
Offline  
Old 07-29-2008, 05:52 AM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2008
Model: 8820
PIN: N/A
Carrier: at&t
Posts: 40
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Figured it out... but was HIGHLIGHT_FOCUS (not select) I was trying to turn off. For others, this is what I did:

Code:
tab1 = new LabelField(tab1Label, tabStyle) {
	protected void drawFocus(Graphics g, boolean on){
		XYRect rect = new XYRect();
		getFocusRect(rect);
		drawHighlightRegion(g, HIGHLIGHT_FOCUS, false, rect.x, rect.y, rect.width, rect.height);
	}
};
Works like a charm. I'm finally grasping the API docs.
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

Axis 291U server 3 - 240Q blades
$75.0
Axis 291U server 3 - 240Q blades pictureAvaya S8300B Media Server 700285364 or 700359011
$9.0
Avaya S8300B Media Server 700285364 or 700359011 pictureNew Sealed ProSoft Technology MVI56E-MNET Modbus TCP/IP Client/Server Interface
$2799.0
New Sealed ProSoft Technology MVI56E-MNET Modbus TCP/IP Client/Server Interface pictureCisco AS5300 VoIP Gateway Access Server
$110.88
Cisco AS5300 VoIP Gateway Access Server pictureGateway 975 Server rack mount
$299.99
Gateway 975  Server rack mount  picture






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