BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 01-29-2009, 11:53 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question console

Please Login to Remove!

hi,
is there such a thing as console in bb? i would like to put there messages for user in my application. or there is only textField?

regards
Offline  
Old 01-29-2009, 12:33 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2007
Location: Delaware
Model: 8310
Carrier: AT&T
Posts: 23
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Why would you need something specifically called a "console?" You can create a "console" type look and feel from a textField or a richTextField. What -- you want to make the background black and the text white or green or something?
Offline  
Old 01-29-2009, 02:22 PM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i would like (for example) to have a black frame, white inside and text black. and with TextField isn't it like that-that every time i want to print text it overwrites the previous text?
Offline  
Old 01-29-2009, 09:07 PM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2007
Location: Delaware
Model: 8310
Carrier: AT&T
Posts: 23
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I see... so use the RichTextField class. Below is sample code to override the paint method so you can change what the control looks like. Below just changes the font color to green. I know the colors are not what you wanted, but this is a nice place to start:

RichTextField console = new RichTextField("This is some console text", RichTextField.FIELD_HCENTER)
{
// Override the paint method to set Font and Color.
public void paint(Graphics graphics)
{
graphics.setColor(Color.GREEN);
super.paint(graphics);
}
};
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





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