BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-27-2010, 09:47 AM   #1 (permalink)
New Member
 
Join Date: Mar 2010
Model: Bold
PIN: N/A
Carrier: WIFI
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Control orientation of drawing text

Please Login to Remove!

Hiberry
i have a question about the orientation of drawing text in blackberry,
is there a methode to draw a text from right to left?
i tried with this :

g.drawText("draw me from R to L", 100,100,Graphics.TOP|Graphics.RIGHT);
g.drawText("draw me from R to L", 100,100,Graphics.TOP|Graphics.LEFT);

but the result is always from left to right

please help
Offline  
Old 03-27-2010, 12:17 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Right - this is expected. What you are doing there is setting the drawing anchor point.

I'm not sure what you are trying to accomplish. Are you trying to actually draw the text backwards, or mirrored?

How about just reversing the characters in the string?
Offline  
Old 03-27-2010, 12:39 PM   #3 (permalink)
New Member
 
Join Date: Mar 2010
Model: Bold
PIN: N/A
Carrier: WIFI
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for reply
what i want to do is to force the orientation of the drawing to be from right to left so if i give x = 200 i want to have my text in the left side of this coordonate
i hope u r understinding me here
Offline  
Old 03-27-2010, 03:19 PM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

You mean you want the text right-justified, rather than right-justified?

|Left justified_______|
|______Right justified|
Offline  
Old 03-28-2010, 05:32 AM   #5 (permalink)
New Member
 
Join Date: Mar 2010
Model: Bold
PIN: N/A
Carrier: WIFI
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes this is what i want
how to do it ?
Offline  
Old 03-28-2010, 09:43 AM   #6 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

That depends on the situation.

If you are trying to right-justify text within a text field of a certain extent, then I think you were on the right track. The extent of the field must be set larger that the text in order for you to notice the difference between the left /right anchor points.

Example:

If you don't set the extent:

|draw me from l to r|
|draw me from r to l|

You will not see the difference, right?


|draw me from l to r_______|
|_______draw me from r to l|
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

DELL 725-10263 / 331-1310 / KT74N Lamp manufactured by DELL
$217.54
DELL 725-10263 / 331-1310 / KT74N Lamp manufactured by DELL pictureDell OEM 3010 series 4 Color Toner Set CMYK, JH565, TH204, XH005, WH006 - New
$199.99
Dell OEM 3010 series 4 Color Toner Set CMYK, JH565, TH204, XH005, WH006 - New pictureDELL XXDNX 25K Toner for LEXMARK T650H11A NEW GENUINE OEM
$195.0
DELL XXDNX 25K Toner for LEXMARK T650H11A NEW GENUINE OEM   pictureBrand New Sealed Genuine OEM DELL CT200572 Cyan Toner Cartridge 3000cn/3100cn
$9.95
Brand New Sealed Genuine OEM DELL CT200572 Cyan Toner Cartridge 3000cn/3100cn pictureGenuine OEM Dell 5110cn High Yield Black Toner Cartridge +
$45.0
Genuine OEM Dell 5110cn High Yield Black Toner Cartridge + picture






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