Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi tabstop rechtsbündig (https://www.delphipraxis.net/142786-tabstop-rechtsbuendig.html)

champagner 3. Nov 2009 20:01


tabstop rechtsbündig
 
Hallo,

ich nehme Bezug auf mein Posting von gestern abend und bedanke mich nochmal bei Dir, himitsu.

http://www.delphipraxis.net/internal...t.php?t=167851
Die Situation: Ich habe nur ein richedit1. Ich möchte die Tabstops rechtsbündig machen.

Ich habe jetzt folgenden Quelltext entworfen:

Delphi-Quellcode:
unit Paraformat_Beispiel;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, richedit, StdCtrls, ComCtrls;

type
  TForm1 = class(TForm)
    RichEdit1: TRichEdit;

    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}


procedure TForm1.FormCreate(Sender: TObject);
var
  pf2 : PARAFORMAT2;
  i  : Integer;
begin
  SendMessage(Richedit1.Handle, EM_GETPARAFORMAT, 0, Longint(@pf2));// brauche ich das?
  FillChar(pf2, SizeOf(pf2), 0); // brauche ich das?
  pf2.cbSize  := SizeOf(pf2);
  pf2.dwMask := PFM_Tabstops;
  pf2.cTabCount :=5;
  pf2.rgxTabs[0]:=1440;
  pf2.rgxTabs[1]:=2880 or $02000000;
  pf2.rgxTabs[2]:=4000;
  pf2.rgxTabs[3]:=5000;
  pf2.rgxTabs[4]:=6000;

  SendMessage(Richedit1.Handle, EM_SETPARAFORMAT, 0, Longint(@pf2));
end;





end.
Das Setzen der Tabstops funktioniert offenbar bestens. Leider funktioniert nicht, dass das Tab [1] rechtsbündig ist.

Bitte (diese Bitte richtet sich auch an Dich himitsu): Was fehlt an meinem Quellcode? Mein System: Vista, Turbodelphi.

Vielen Dank!

Luckie 3. Nov 2009 21:12

Re: tabstop rechtsbündig
 
warum machst du deshalb einen neuen Thread auf? Hier gehts weiter: http://www.delphipraxis.net/internal...t.php?t=167851


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:33 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz