BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-18-2009, 05:53 AM   #1
renuka_anil
Thumbs Must Hurt
 
Join Date: Mar 2007
Location: India
Model: 8100
Carrier: Airtel
Posts: 64
Default custom basic edit field

Please Login to Remove!

Hello All,



I am trying to customize basic edit field for editing text which is more than screen height



First I split the text in number of lines. Then in paint I drawn them. And i have set the cursor position to 0 (zero).



Below is the paitn method.



protected void paint(Graphics graphics){
try{
graphics.setColor(0x620000);
graphics.setFont(textFieldFont);
graphics.drawBitmap(0, 0, Graphics.getScreenWidth(), Graphics.getScreenHeight(), backgroundImage, 0 , 0);
int y = 5;
graphics.setColor(0x620000);
for(int i = startIndex; i < scrollIndex; i++){
graphics.drawText(vecData.elementAt(i).toString(), 2, y);
y = y + textFieldFont.getHeight() + 6;
}
super.paint(graphics);
graphics.setColor(0x620000);
graphics.setFont(textFieldFont);
}catch(Exception ex){
System.out.println("Exception in paint :: CustomTextField "+ex.toString());
}
}



statrindex and scrollindex are incremented in navigation method.



But, when I enter new charatcer it gets drawn on present text. And cursor is not visible.

I want the this to be worked same as textfield but its not working. can any one tell me how can I do this?



Thanks
__________________
Crazy for BlackBerry
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


Johnson Controls MS-VMA1630-1 VMA ProgrammableVAV Box Controller picture

Johnson Controls MS-VMA1630-1 VMA ProgrammableVAV Box Controller

$145.00



Johnson Controls (240) F4-XPM04060-0 picture

Johnson Controls (240) F4-XPM04060-0

$149.99



johnson controls m4-cvmo3050-op picture

johnson controls m4-cvmo3050-op

$245.00



JOHNSON CONTROLS Y75 BS-1 Replacement Flame Sensor picture

JOHNSON CONTROLS Y75 BS-1 Replacement Flame Sensor

$8.00



Johnson Controls SE-SPU1002-1 Simplicity SE Unit Display Controller picture

Johnson Controls SE-SPU1002-1 Simplicity SE Unit Display Controller

$99.95



Johnson Controls Metasys CVE03050 controller.     M4-CVE03050-0P (NEW) picture

Johnson Controls Metasys CVE03050 controller. M4-CVE03050-0P (NEW)

$200.00







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