Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing the text color

 
sara shamsi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all ..
How can I change the color of text with out using "graphic g"??
good bye
sara
 
David Price
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you mean: "How can I change the text colour in MIDP high-level UI screens (Form, List, TextBox)?". The simple answer is: you can't - these screens use the phone's native fonts and colour settings.
You can only change the text colour in MIDP low-level UI screens (Canvas, MIDP 2.0 GameCanvas) and in MIDP 2.0 'CustomItems' (items on a form which are each like a little Canvas). These all use that 'Graphics g'.
 
sara shamsi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you David ..
ok if I can't change the text colour in MIDP high-level UI screens... can I highlights the text ??
Sara
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can underline text, make it bold or use any supported font in the high level API. Refer to the "Font" and StringItem" classes in the javadoc.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic