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
Developer
Posts: 122
Registered: ‎08-11-2008
My Device: 9700
My Carrier: XL

text of LabelField outside the screen visibility?

Hi All,

 

I need help about the LabelField with unicode text.

 

I create a LabelField with long unicode text (arabic).

when I use the default alignment (LEFT), i have no problem

with long unicode text.

 

the arabic languange, using right alignment,  so i change

the alignment to RIGHT.

But i got problem with the labelfield (only for long text).

 

I attach image of the problem.

I write 2 line of equal LabelField,

I only change the allignment style.

*that 2 LabelFields i added to VerticalFieldManager*

 

the first line (white background) is the problem,

LabelField with style Field.USE_ALL_WIDTH | DrawStyle.RIGHT,

getting outside of the screen visibility.

 

the second line (blue background when focused),

have no problem with long text of LabelField.

 

anyone have answer of my problem?

thank you so much.

 

 

 

problem on oqp 

--
"Give kudos (star) if you feel response is helpful"
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: text of LabelField outside the screen visibility?

What BlackBerry model and handheld software version are you testing with? Can you post the byte array or unicode string you are using in this test?  Thanks!
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Developer
Posts: 122
Registered: ‎08-11-2008
My Device: 9700
My Carrier: XL

Re: text of LabelField outside the screen visibility?

 

Thanks Mark,

 

i test using 8800/4.5.0.52 and 9000/4.6.0.126 ...

 

 this is my sample code ...

 

LabelField lbl09 = new LabelField("\u0648\u064E\u062C\u064E\u0639\u064E\u0644\u0652\u0646\u064E\u0627 \u0645\u0650\u0646 \u0628\u064E\u064A\u0652\u0646\u0650 \u0623\u064E\u064A\u0652\u062F\u0650\u064A\u0647\u0650\u0645\u0652 \u0633\u064E\u062F\u0651\u064B\u06ED\u0627 \u0648\u064E\u0645\u0650\u0646\u0652 \u062E\u064E\u0644\u0652\u0641\u0650\u0647\u0650\u0645\u0652 \u0633\u064E\u062F\u0651\u064B\u06ED\u0627 \u0641\u064E\u0623\u064E\u063A\u0652\u0634\u064E\u064A\u0652\u0646\u064E\u0647\u064F\u0645\u0652 \u0641\u064E\u0647\u064F\u0645\u0652 \u0644\u064E\u0627 \u064A\u064F\u0628\u0652\u0635\u0650\u0631\u064F\u0648\u0646\u064E \u0028\u0669\u0029 ",RichTextField.FOCUSABLE|RichTextField.USE_ALL_WIDTH|DrawStyle.RIGHT);
lbl09.setFont(fnt);
vfm1.add(lbl09);

 

LabelField lbl009 = new LabelField("\u0648\u064E\u062C\u064E\u0639\u064E\u0644\u0652\u0646\u064E\u0627 \u0645\u0650\u0646 \u0628\u064E\u064A\u0652\u0646\u0650 \u0623\u064E\u064A\u0652\u062F\u0650\u064A\u0647\u0650\u0645\u0652 \u0633\u064E\u062F\u0651\u064B\u06ED\u0627 \u0648\u064E\u0645\u0650\u0646\u0652 \u062E\u064E\u0644\u0652\u0641\u0650\u0647\u0650\u0645\u0652 \u0633\u064E\u062F\u0651\u064B\u06ED\u0627 \u0641\u064E\u0623\u064E\u063A\u0652\u0634\u064E\u064A\u0652\u0646\u064E\u0647\u064F\u0645\u0652 \u0641\u064E\u0647\u064F\u0645\u0652 \u0644\u064E\u0627 \u064A\u064F\u0628\u0652\u0635\u0650\u0631\u064F\u0648\u0646\u064E \u0028\u0669\u0029 ",RichTextField.FOCUSABLE|RichTextField.USE_ALL_WIDTH|DrawStyle.LEFT);
lbl009.setFont(fnt);
vfm1.add(lbl009);

 

--
"Give kudos (star) if you feel response is helpful"
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: text of LabelField outside the screen visibility?

What font is specified in fnt?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Developer
Posts: 122
Registered: ‎08-11-2008
My Device: 9700
My Carrier: XL

Re: text of LabelField outside the screen visibility?

Font fnt = this.getFont().derive(Font.BOLD);

 

nothing special isn't it?

--
"Give kudos (star) if you feel response is helpful"
Highlighted
BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: text of LabelField outside the screen visibility?

I haven't been able to reproduce the screenshot you have above.  What type of screen are the LabelFields being added to?  Is the screen customized in any way?  Is there any nested or customized managers being used?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker