BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-10-2008, 11:45 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2007
Model: 7100i
PIN: N/A
Carrier: Dont know
Posts: 195
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Doubt on paint method

Please Login to Remove!

hi

I want to draw a rectangle on the mainscreen when i click a menu item given on the page. What i know is we can draw anything on the mainscreen by putting our code in the paint method of the mainscreen. But what i dont know how will i make the recttangle appear when i click the menu item.

Can anybody explain me.

Thanks in advance..
Offline  
Old 09-10-2008, 01:20 PM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!

In your MainScreen subclass (you are subclassing MainScreen, right?), call

this.invalidate()

when you want to cause a "screen refresh" event that will cause your Screen's paint() method to be executed.

Cheers,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
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

MAX31855KASA ~ MAX31855 Compensated Thermocouple-to-Digital Converter IC
$8.39
MAX31855KASA ~ MAX31855 Compensated Thermocouple-to-Digital Converter IC pictureDigital Thermometer TM6902D 4.65x2.76x1.14 inch Black with Thermocouple Sensor
$9.75
Digital Thermometer TM6902D 4.65x2.76x1.14 inch Black with Thermocouple Sensor picture10PCS Male K Type Thermometer Thermocouple Wire Cable Connector Plug JHRS
$4.19
10PCS Male K Type Thermometer Thermocouple Wire Cable Connector Plug JHRS pictureROBERTSHAW 24 inch Thermocouple A 1970 024 - NEW -
$9.95
ROBERTSHAW  24 inch Thermocouple A 1970 024 - NEW -  pictureLARGE LOT OF 7 NEW HONEYWELL UNIVERSAL 30 MILLIVOLT 36 IN. THERMOCOUPLES
$25.0
LARGE LOT OF 7 NEW HONEYWELL UNIVERSAL 30 MILLIVOLT 36 IN. THERMOCOUPLES picture






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