• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Changing the text color

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all ..
How can I change the color of text with out using "graphic g"??
good bye
sara
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic