Solved

TAB!

Posted on 2001-06-07
4
225 Views
Last Modified: 2010-04-06
how do u put a tab characted in a memo?  i want to align my data so i want to display them in between tabs...how do i do this???

tnx!!!
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 8

Accepted Solution

by:
TOndrej earned 50 total points
ID: 6162812
Set TMemo.WantTabs property to True.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6162845
memo1.lines.add('Before tab'+#9+'after Tab');
0
 
LVL 3

Expert Comment

by:f15iaf
ID: 6167228
This may help:
The program put 9 spaces when user clicks tab button:

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls;

type
  TForm1 = class(TForm)
    Memo1: TMemo;
    Timer1: TTimer;
    procedure Timer1Timer(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Timer1Timer(Sender: TObject);
begin
        if(form1.activecontrol=memo1)then
        begin
                if(getkeystate(VK_TAB)<0)then
                memo1.SelText:='        ';
        end;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
        timeout:dword;
begin
        systemparametersinfo(spi_getkeyboardspeed,0,@timeout,0);
        timer1.Interval:=timeout;
end;

end.
0
 
LVL 6

Expert Comment

by:wimmeyvaert
ID: 6170697
Why not using RichEdit instead ?
Than you can set your own tabs like this :

  With RichEdit1.Paragraph do
  begin
    Tab[0] := 90;
    Tab[1] := 150;
    Tab[2] := 200;
    Tab[3] := 250;
  end;


Be sure that WantTabs-property is set to True.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question