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


Bissell 3-in-1 Lightweight Corded Stick Vacuum 2030 picture

Bissell 3-in-1 Lightweight Corded Stick Vacuum 2030

$28.88



BISSELL 3-in-1 Turbo Lightweight Stick Vacuum, 2610 (Black) picture

BISSELL 3-in-1 Turbo Lightweight Stick Vacuum, 2610 (Black)

$36.06



JB DV-22N Digital Micron Vacuum Gauge with JB Charging Hose picture

JB DV-22N Digital Micron Vacuum Gauge with JB Charging Hose

$75.00



Vacuum Air Fuel Water Line Tube Hose Barbed Connector Coupling Tee Elbow T X Y picture

Vacuum Air Fuel Water Line Tube Hose Barbed Connector Coupling Tee Elbow T X Y

$1.99



VEVOR 5 Gallon Vacuum Chamber with 5CFM Vacuum Pump Kit 1/3HP Single Stage 110V picture

VEVOR 5 Gallon Vacuum Chamber with 5CFM Vacuum Pump Kit 1/3HP Single Stage 110V

$104.99



Commercial Vacuum Sealer Machine Chamber Food Saver Bag Packing Sealing 110V picture

Commercial Vacuum Sealer Machine Chamber Food Saver Bag Packing Sealing 110V

$241.99







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