Page 1 of 1

[19 Aug 2008] Tabulators in print

Posted: Sat Jun 13, 2020 5:31 pm
by lazi
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 19 Aug 2008 00:17:15 +0200

Hello!

I have not been so active in the last time regarding Hollywood. I am currently trying to get back on track and do less working :)

There is an example in the guide for the AddTab function. It looks like this:

Code: Select all

AddTab(100, 200, 300, 400)
 
SetFontStyle(#UNDERLINED)
NPrint("Last name\tFirst name\tAge\tGender\n")
SetFontStyle(#NORMAL)
NPrint("Doe\tJon\t34\tMale")
NPrint("Smith\tMaggie\t25\tFemale")
NPrint("...\t...\t...\t...")
It makes a nice table into the window.

Now try to add a Locate instruction to the first line, eg.:

Code: Select all

Locate (50,300) 
The result is a bit strange for me. From the second line it don't follows the tabulator positions as the first line.

Do I misunderstand something, or is it a problem?

[19 Aug 2008] Re: Tabulators in print

Posted: Sat Jun 13, 2020 5:31 pm
by airsoftsoftwair
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 19 Aug 2008 00:34:53 +0200
Do I misunderstand something, or is it a problem?
The behaviour is alright. When the text commands encounter a tab character in a string, they advance the cursor to the next tab they find. Thus, if you offset the cursor using Locate() it will change the tab behaviour unless you do it for each line.