• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

tab character

Can anyone tell me what the code is to insert a tab in a textfile ?

By exam. with chr$(13) you can insert an CR/LF
0
RichardBorst
Asked:
RichardBorst
  • 4
  • 2
  • 2
  • +4
1 Solution
 
kretzschmarCommented:
hi Richard,
#9 is the tabchar (Chr(9))
meikl
0
 
DrDelphiCommented:
CHR$(13)? Uh-oh... VB Alert!!<g>
0
 
kretzschmarCommented:
:-))
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
nricoCommented:
Nitpicker alert:

#13 is only the CR
#10 is the LF
(and yes, #9 is the TAB)
0
 
nricoCommented:
:-)
0
 
bogieman_Commented:
>:-|
0
 
guntherdsCommented:
it's character 12!
0
 
kretzschmarCommented:
nope guntherds,

a part from the virtuel keycode defintions

  VK_BACK = 8;       //backspace
  VK_TAB = 9;         //tab
  VK_RETURN = 13; //enter/return

meikl
0
 
intheCommented:
it is definetly 9

this will show you:

procedure TForm1.Edit1KeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
showmessage(inttostr(key));
end;

the points are meikls..
0
 
guntherdsCommented:
my opinion is: it doenst work on ASCII-files, if I remember well, I had this problem a few days ago, and I solved it with character 12
but unfortunately, (or fortunately) its weekend, and I can't check it at work,
but if you're right, congratulations, I'm sorry
0
 
RichardBorstAuthor Commented:
I work with #9. this works
0
 
kretzschmarCommented:
hi richard,

glad that #9 works for you

i guess i should answer
happy new year

meikl ;-)
0
 
RichardBorstAuthor Commented:
I thought I accepted your comment as an answer already more then a week ago.

Anyway, again.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 4
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now