BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-18-2009, 06:38 AM   #1 (permalink)
New Member
 
Join Date: Nov 2009
Model: Storm
PIN: N/A
Carrier: dont know
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default how to display Text vertically

Please Login to Remove!

Does any body know how to display the text vertically as shown in the figure below?

urgent help required.
Attached Images
File Type: png Vertical Text.png (23.5 KB, 4 views)
Offline  
Old 11-18-2009, 07:44 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 9000
Carrier: Airtel
Posts: 81
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i think its very simple you can go for custom field implementation like
vLabelField.
Code:
public class vLabelField extends Field {
	String text;
	public vLabelField(String t) {
		text = t;
		
	}
	protected void paint(Graphics graphics) {
		int y=0;
		int oldcolor = graphics.getColor();
		graphics.setColor(Color.BLACK);
		for(int i=0;i<text.length();i++){
			graphics.drawText(text.substring(i,i+1), 0, y);
			y=y+getFont().getHeight();
		}
		graphics.setColor(oldcolor);
				
	}
	protected void layout(int width, int height) {
		width = Font.getDefault().getAdvance('M');
		height = Font.getDefault().getHeight()*text.length();
		setExtent(width,height);
	}
}
Its not a optimized piece of code. Its just for giving you a idea.
__________________
blog.vimviv.com

Last edited by vivartpandey : 11-18-2009 at 07:46 AM.
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

For Arduino ADS1115 Module 4 Channel 16 Bit I2C ADC With Pro Gain Amplifier D
$2.21
For Arduino ADS1115 Module 4 Channel 16 Bit I2C ADC With Pro Gain Amplifier D pictureENDEVCO CHARGER AMPLIFIER MODEL 2680M6 GAIN RANGE 5-50 (A17)
$85.0
ENDEVCO CHARGER AMPLIFIER MODEL 2680M6 GAIN RANGE 5-50 (A17) pictureHP 8447A Broadband Amplifier .1-600 MHz Tested, working w/ gain plot
$125.0
HP 8447A Broadband Amplifier .1-600 MHz Tested, working w/ gain plot pictureSUNX LTD GA-2 FX7 Proximity Sensor Amplifier 30 VDC .2 A Max GA-2D GA2 (TB)
$39.99
SUNX LTD GA-2 FX7 Proximity Sensor Amplifier 30 VDC .2 A Max GA-2D GA2 (TB) pictureMAX9812 Microphone Amplifier Sound MIC Voice Module for Arduino 3.3V/3.5V
$1.41
MAX9812 Microphone Amplifier Sound MIC Voice Module for Arduino 3.3V/3.5V picture






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