BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-09-2013, 08:19 AM   #1
himanshuguptagupta
New Member
 
Join Date: Aug 2013
Model: 7100T
PIN: N/A
Carrier: Aircel
Posts: 1
Default Custom fields

Please Login to Remove!

Hello Everyone.
I wish to create a custom field.So I extend my class with Field and gave the body of paint and layout methods.And then draw a rectangle in paint method.
Now i wish that my rectangle should be clickable and events can be trapped on it when user clicks.
Please help me out to make the rectangle clickable and to trap events on it.
A part of my code is:

Code:
package mypackage;

import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.container.MainScreen;


public final class rect extends Field
{
    public rect()
    {        
            
        
    }
   

	protected void layout(int arg0, int arg1) {

		setExtent(200,200);
		
	}

	protected void paint(Graphics g) {
		
		g.drawRect(20, 20, 160, 60);
		
		
	}
}
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

Similar Threads for: Custom fields
Thread Thread Starter Forum Replies Last Post
Long, detailed review of ToySoft's Profiler. GadgetGuru72 Aftermarket Software 5 03-13-2009 09:27 AM
How to remove the blank spaces between the fields in the Custom Button Field Example jagv98 Developer Forum 2 03-10-2009 09:56 AM
BlackBerry Custom Fields Zarjay Developer Forum 1 03-19-2008 04:07 AM
Intellisync Lotus Notes Custom Fields ehan RIM Software 1 05-23-2006 12:10 PM


CBB60 Motor Run Capacitor 450VAC 10uF/20uF/30uF/40uF/50uF 4 Pins CE Standard picture

CBB60 Motor Run Capacitor 450VAC 10uF/20uF/30uF/40uF/50uF 4 Pins CE Standard

$8.99



CBB60 Capacitor 250VAC 60UF MFD For Motor Run 2 Wires Metallized Polypropylene picture

CBB60 Capacitor 250VAC 60UF MFD For Motor Run 2 Wires Metallized Polypropylene

$12.99



DAYTON Motor Run Capacitor: Round, 440V AC, 25 mfd 2MEH2 picture

DAYTON Motor Run Capacitor: Round, 440V AC, 25 mfd 2MEH2

$15.00



25pcs Nichicon Aluminum Electrolytic Capacitors SMD 330uF 35V 20% UWD1V331MCQ1GS picture

25pcs Nichicon Aluminum Electrolytic Capacitors SMD 330uF 35V 20% UWD1V331MCQ1GS

$10.00



CBB61 250V  Capacitor 2 wires 1/2/3/3.5/4/5/6/7/8/9/10/12/15/18/20/24/25/30 UF picture

CBB61 250V Capacitor 2 wires 1/2/3/3.5/4/5/6/7/8/9/10/12/15/18/20/24/25/30 UF

$129.95



Snap in Electrolytic Capacitor Large Electrolytic Can Capacitor 100uF - 100000uF picture

Snap in Electrolytic Capacitor Large Electrolytic Can Capacitor 100uF - 100000uF

$358.98







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