New topic: 

decimal alignment output issues

<http://forums.realsoftware.com/viewtopic.php?t=47659>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        KWL          Post subject: decimal alignment output 
issuesPosted: Sun Apr 21, 2013 12:03 pm                         
Joined: Thu Feb 21, 2013 3:59 pm
Posts: 7                I need to print a series of integer and decimal values 
in a column, decimal point aligned using stringshape.  Values are in an array. 
Can this be done?  Using MAC with RS2012R2

KL   
                             Top                Ballyanthony          Post 
subject: Re: decimal alignment output issuesPosted: Sun Apr 21, 2013 12:48 pm   
                      
Joined: Fri Apr 19, 2013 2:08 am
Posts: 5                I assume you don't want to convert the integers to 
decimals or print a decimal for the integers?

The way I'd approach it is to "see" what the StringWidth of the text is before 
and excluding the decimal point.

123.456
78.90
1
12.34
2

So in the above, it would be the width of 123, 78, 1, 12 & 2. And use that 
width as an offset for the starting point of x in Graphics.DrawObject s,x,y

Something like:
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to