Colour text.

how to change the colour of text in output?

Comments

  • : how to change the colour of text in output?
    :
    In Text mode you can use TextColor() and TextBackground() from the Crt unit. In Graphics mode use the SetColor() and SetBackground() from the Graphs unit.
  • : : how to change the colour of text in output?
    : :
    : In Text mode you can use TextColor() and TextBackground() from the Crt unit. In Graphics mode use the SetColor() and SetBackground() from the Graphs unit.
    :
    for example

    if i want to display 'apple' in red
    what should i do?
  • : : : how to change the colour of text in output?
    : : :
    : : In Text mode you can use TextColor() and TextBackground() from the Crt unit. In Graphics mode use the SetColor() and SetBackground() from the Graphs unit.
    : :
    : for example
    :
    : if i want to display 'apple' in red
    : what should i do?
    :
    First you set the color using TextColor(). Then you write the word 'apple'. The two units have the color names defined as constants. So the complete code would be:
    [code]
    TextColor(Red);
    Write('Apple');
    [/code]
    The help files contain more info on the color constants and TextColor().
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories