Announcement

Collapse
No announcement yet.

txt_Set / TEXT_HEIGHT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • txt_Set / TEXT_HEIGHT

    Hello,
    here is my code :

    HTML Code:
    cpt := 0 ;
    repeat
    txt_Set(TEXT_HEIGHT, 2);
    txt_MoveCursor(cpt, 0);
    print("WORD1") ;
    print("WORD2") ;
    cpt++ ;
    until (cpt == 5) ;
    But I get something like this:

    WORD1WORD2
    WORD1WORD2
    WORD1WORD2
    ...

    Why the text format is not kept in the second print intruction ?
    Thank you

    µLCD-32032-P1T / WS2.3 / Pmmc 1.06

  • #2


    Hi Vincent,
    along with TEXT_ITALIC, TEXT_HEIGHT and TEXT_WIDTH only persist
    for the next action and are automatically reset. This is done to save code space as you only need to 'trigger' them. The documentation has been updated to show this.

    so to do what you require, the code will need to be altered.

    #constant th 2

    func main()

    var cpt;
    cpt := 0 ;
    repeat
    txt_MoveCursor(cpt*th, 0);
    txt_Set(TEXT_HEIGHT, th);
    print("WORD1") ;
    txt_Set(TEXT_HEIGHT, th);
    print("WORD2") ;
    cpt++ ;
    until (cpt == 5) ;

    repeat forever

    endfunc
    Regards,
    Dave

    Comment

    Working...
    X