Solved

TAB!

Posted on 2001-06-07
4
220 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now