BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 09-18-2009, 05:53 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Mar 2007
Location: India
Model: 8100
Carrier: Airtel
Posts: 64
Post Thanks: 0
Thanked 0 Times in 0 Posts
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


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

2 Pack Apple Earpods OEM Original Stereo Headphones w/Control-White MD827LL/A
$20.0
2 Pack Apple Earpods OEM Original Stereo Headphones w/Control-White MD827LL/A picture(C21) Genuine OEM Apple AC Cord
$25.0
(C21) Genuine OEM Apple AC Cord picture4 x Black Inkjet Cartridges Non-OEM Alternative For T1291
$11.95
4 x Black Inkjet Cartridges Non-OEM Alternative For T1291 pictureNew OEM Lightning to USB Cable Charger Data Cord for iPhone 5 5S 5C 6 6 Plus
$2.7
New OEM Lightning to USB Cable Charger Data Cord for iPhone 5 5S 5C 6 6 Plus  pictureOEM Genuine Original for Apple iPhone 5s 6s 6+ Lightning USB Data Cable Charger
$2.7
OEM Genuine Original for Apple iPhone 5s 6s 6+ Lightning USB Data Cable Charger  picture






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