BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 03-27-2010, 09:47 AM   #1
kotman
New Member
 
Join Date: Mar 2010
Model: Bold
PIN: N/A
Carrier: WIFI
Posts: 5
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
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
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
kotman
New Member
 
Join Date: Mar 2010
Model: Bold
PIN: N/A
Carrier: WIFI
Posts: 5
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
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
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
kotman
New Member
 
Join Date: Mar 2010
Model: Bold
PIN: N/A
Carrier: WIFI
Posts: 5
Default

yes this is what i want
how to do it ?
Offline  
Old 03-28-2010, 09:43 AM   #6
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
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



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Dell OEM Latitude Rugged Extreme 5414 Driving Board Cable for Cable 5414VERTCBL picture

Dell OEM Latitude Rugged Extreme 5414 Driving Board Cable for Cable 5414VERTCBL

$8.95



Dell OEM Latitude Rugged Extreme 7404 GPS Antenna Junction Cable Cable KMX0M picture

Dell OEM Latitude Rugged Extreme 7404 GPS Antenna Junction Cable Cable KMX0M

$2.95



Dell OEM Latitude Rugged Extreme 7404 Left and Right Mouse Buttons 00008 picture

Dell OEM Latitude Rugged Extreme 7404 Left and Right Mouse Buttons 00008

$5.95



OEM Dell XPS 8910 8920 8930 Alienware Aurora R5 R6 R7 Front Cooling Fan 7M0F5 picture

OEM Dell XPS 8910 8920 8930 Alienware Aurora R5 R6 R7 Front Cooling Fan 7M0F5

$12.11



NEW DELL OEM REPLACEMENT PROJECTOR LAMP FOR 4220 4320 GENUINE ORIGINAL  picture

NEW DELL OEM REPLACEMENT PROJECTOR LAMP FOR 4220 4320 GENUINE ORIGINAL

$198.22



DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X  - Made By DELL picture

DELL 330-6581 3306581 725-10229 OEM LAMP FOR 1510X 1610HD 1610X - Made By DELL

$39.98







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