[19 Aug 2008] Tabulators in print

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
User avatar
lazi
Posts: 646
Joined: Thu Feb 24, 2011 11:08 pm

[19 Aug 2008] Tabulators in print

Post 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?
User avatar
airsoftsoftwair
Posts: 5833
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[19 Aug 2008] Re: Tabulators in print

Post 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.
Locked