BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 04-01-2007, 11:53 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jan 2007
Model: 7230
Posts: 16
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with Rectangle arround the EditField

Please Login to Remove!

Hi All,

I have two problem:

1. I have done rectangle arround the EditField when focus is come. But my problem is after entering the text in rectangle, text is removed whenever we try to go to another field. text is comming after come back. What to do for that plz suggest me.

2. My Second problem is, if entering the data in the rectagular area after complete on line cursor move to the another line and rectangular area automatic extended. But
I want after completion of one line cursor should not be move to another line only text should be move in one line from right to left in rectangular area. And also i want according to wish we could move the cursor from end of the line to the start of the line in a particular rectangle. Plz help me.


I have written some code for that


ed1=new EditField("","",200,BasicEditField.NO_NEWLINE)
{
boolean focus=false;
protected void onFocus(int i)
{
focus = true;
invalidate(); // redraw field
}
protected void onUnfocus() {
focus = false;
invalidate(); // redraw field
}
public void paint(Graphics g)
{
if(focus)
{
g.setColor(0x00000000);
System.out.println("");
g.drawRect(0,0, getExtent().width, getExtent().height);
super.paint(g);
}
}
};
ed2=new EditField("","",300,BasicEditField.NO_NEWLINE)
{
boolean focus=false;
protected void onFocus(int i)
{
focus = true;
invalidate(); // redraw field
}
protected void onUnfocus() {
focus = false;
invalidate(); // redraw field
}
public void paint(Graphics g)
{
if(focus)
{
g.setColor(0x00000000);
System.out.println("");
g.drawRect(0,0, getExtent().width, getExtent().height);
super.paint(g);
}
}
};
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

NEC Univerge SV8100 CD-VM00 Voice Mail and App Server with 110 Hour UM 8000 Mail
$199.99
NEC Univerge SV8100 CD-VM00 Voice Mail and App Server with 110 Hour UM 8000 Mail pictureCENTON RD725G01 4GB PC3-10600 DDR3-1333MHz ECC CL9 244-Pin Dimm Server Memory
$19.5
CENTON RD725G01 4GB PC3-10600 DDR3-1333MHz ECC CL9 244-Pin Dimm Server Memory picture Antique Cars waitress server waiter waist apron 3 pockets
$13.0
 Antique Cars waitress server waiter waist apron 3 pockets pictureCarlisle xt5000 black 5 gallon hot cold beverage coffee server Cambro
$56.78
Carlisle xt5000 black 5 gallon hot cold beverage coffee server Cambro pictureAxis 241s Video Server
$19.99
Axis 241s Video Server picture






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