Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 187
Registered: ‎08-13-2008
My Device: Not Specified
Accepted Solution

scroll the VerticalFieldManger to see the full message content without loosing the focus on the AutoTextEditField

I am creating the application like chat window.

 

I have used VerticalFieldManager, AutoTextEditField and RichTextField.

 

AutoTextEditField - Typing the message.

RichTextField - Add the chat messages

 

RichTextField is add in VerticalFieldManager.

 

How to scroll the VerticalFieldManger to see the full message content without loosing the focus on the AutoTextEditField.

Developer
Posts: 16,791
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: scroll the VerticalFieldManger to see the full message content without loosing the focus on the AutoTextEditField

setVerticalScroll

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 39
Registered: ‎10-19-2010
My Device: drova 9700

Re: scroll the VerticalFieldManger to see the full message content without loosing the focus on the AutoTextEditField

[ Edited ]

override navigationmovement . It's example how im using it.

 

 

protected boolean navigationMovement(int dx, int dy, int status, int time)
 {
  if (dy==1)
    {   
  int newscroll = mains.getVerticalScroll();
  int pageheigh = mains.getHeight();
    mains.setVerticalScroll(newscroll+50);
    invalidate();
  return true;  }
return super.navigationMovement(dx, dy, status, time);}

50  - it's step. It's very good work for me ( but need create if newscroll <0 and if newscroll> yourmanager of chat field)

mains = VerticalFieldManager()

Hope it's help you.

Regards, Peter.

 

 

Highlighted
Developer
Posts: 237
Registered: ‎05-07-2010
My Device: 8520
My Carrier: Internet

Re: scroll the VerticalFieldManger to see the full message content without loosing the focus on the AutoTextEditField

hi,

 

you can do it in many ways.

 

1.If you want to set your autoedit text field at bottom then just use setStatus(autoedittextfield).it will add the

autoedittextfield at the bottom.

 

then just use one scrollable verticalfieldmanager with verticalscroll and ad your textfield there.

 

so at the bottom your autoedittextfield remains static where as you can scroll  verticalfieldmanager .

 

i assume that u know how to make a verticalfield scrollable.

 

 

thankx.

___________________________________________________
please press kudos(star button on left) if this post is helpful to you
"Accept as solution" if your query has been resolved.@hitendra
_________________________________________________
Developer
Posts: 187
Registered: ‎08-13-2008
My Device: Not Specified

Re: scroll the VerticalFieldManger to see the full message content without loosing the focus on the AutoTextEditField

Thanks for reply guys.

Developer
Posts: 237
Registered: ‎05-07-2010
My Device: 8520
My Carrier: Internet

Re: scroll the VerticalFieldManger to see the full message content without loosing the focus on the AutoTextEditField

hi,

 

could you please mark post as solved if your problem has been resolved.

 

 

thankx.

___________________________________________________
please press kudos(star button on left) if this post is helpful to you
"Accept as solution" if your query has been resolved.@hitendra
_________________________________________________