Solved

TAB!

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Correct Component for Shopping Cart. 2 112
Error E2158 compiling with Delphi XE10 Seattle 2 115
Convert a string into a TDateTime 5 64
Base1 Encode/Decode 3 82
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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

820 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