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: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon
Accepted Solution

Using DrawTextParam in a LabelField

[ Edited ]

The problem I am having is that I need an ellipsis at the start of the text.

 

I have a method that creates a LabelField, it displays a path to a file. The file needs to have the end of the file visible.

 

This is why I need the ellipsis at the start so that the user can see the end of the path. I looked around and came across DrawTextParam. One of it's fields is exactly what I need (TRUNCATE_WITH_ELLIPSIS_AT_START) but I can not find any method/style that accepts it.

 

Is there any way I can use this on a field? Perferably LabelField but if something else accepts it then I can change my code.

Message Edited by rcmaniac25 on 05-06-2009 06:58 AM
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Using DrawTextParam in a LabelField

Does anyone know how to put an ellipsis in front of a string on trunctated text using DrawTextParam.
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 696
Registered: ‎12-02-2008
My Device: Not Specified

Re: Using DrawTextParam in a LabelField

Hi,

 

Try using DrawStyle.TRUNCATE_BEGINNING may be this will solve your problem.

Regards,
Rajat Gupta.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Using DrawTextParam in a LabelField

Unfortunately that is not working. Even if it did I would really like to have an ellipsis at the beginning so the user knows there is more to the path.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Using DrawTextParam in a LabelField

Scratch what I just said. I didn't read the documentation about it. If you use the ELLIPSIS field with TRUNCATE_BEGINNING it will truncate the text and add the ellipsis to the front of the text. Thanks Rajat_10Sep.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.