BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-29-2008, 04:45 AM   #1
pwaugh
Knows Where the Search Button Is
 
Join Date: Mar 2008
Model: 8820
PIN: N/A
Carrier: at&t
Posts: 40
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
pwaugh
Knows Where the Search Button Is
 
Join Date: Mar 2008
Model: 8820
PIN: N/A
Carrier: at&t
Posts: 40
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


APPLE 630-0895-B  VRAM 128K X 8 BOARD CARD VINTAGE picture

APPLE 630-0895-B VRAM 128K X 8 BOARD CARD VINTAGE

$74.77



APPLE 820-0522-A 630-0895-B LITE VRAM 128K X 8 BOARD  picture

APPLE 820-0522-A 630-0895-B LITE VRAM 128K X 8 BOARD

$149.99



128K RAM - APPLE - ORIGINAL APPLE prototype BOARD picture

128K RAM - APPLE - ORIGINAL APPLE prototype BOARD

$408.75







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