2 table haven't the same distance from left memo-border

General TRichView support forum. Please post your questions here
Post Reply
j&b
Posts: 184
Joined: Mon Sep 05, 2005 1:35 pm

2 table haven't the same distance from left memo-border

Post by j&b »

procedure TForm1.pTest1Click(Sender: TObject);
var table: TRVTableItemInfo;
DItemNo, DItemOffs, X, Y: integer;
begin
rve := rve.TopLevelEditor;
rve.RVData.Item2DrawItem(rve.CurItemNo, rve.OffsetInCurItem, DItemNo, DItemOffs);
rve.RVData.GetOriginEx(X, Y);
ShowMessage(intToStr(x)+', '+intToStr(y)); //seems to be oK

// but now ?

// I don't find an issue as rve.RVData.SEToriginEx(X, Y);

end;
j&b
Posts: 184
Joined: Mon Sep 05, 2005 1:35 pm

Re: 2 table haven't the same distance from left memo-border

Post by j&b »

j&b wrote:procedure TForm1.pTest1Click(Sender: TObject);

{Some unnessary variable:
VAR table: TRVTableItemInfo;
DItemNo, DItemOffs,}

var X, Y: integer;
begin
rve := rve.TopLevelEditor;
//rve.RVData.Item2DrawItem(rve.CurItemNo, rve.OffsetInCurItem, DItemNo, DItemOffs);
rve.RVData.GetOriginEx(X, Y);
ShowMessage(intToStr(x)+', '+intToStr(y)); //seems to be oK

// but now ?

// I don't find an issue as rve.RVData.SEToriginEx(X, Y);

end;
j&b
Posts: 184
Joined: Mon Sep 05, 2005 1:35 pm

Re: 2 table haven't the same distance from left memo-border

Post by j&b »

j&b wrote:
j&b wrote:procedure TForm1.pTest1Click(Sender: TObject);

Oh, oh ...
...

var X, Y: integer;
rve: TCustomRichViewEdit;
begin
...
end;

No x. quote !
j&b
Posts: 184
Joined: Mon Sep 05, 2005 1:35 pm

Re: 2 table haven't the same distance from left memo-border

Post by j&b »

I think I was on the wrong track (Holzweg).

It is related to rvRuler (Left Indent).
In the following procedure the variable 'old' does not show the correct position (LeftIndent) of the table.

Who has a solution?



procedure TForm1.pT1Click(Sender: TObject);
var s1,s2,old: string;
nWert: Extended;
ok: boolean;
label nmal;
begin
old:= floatToStr(rvruler1.LeftIndent);


s1:='Linken Einzug nach links/rechts verschieben';
s2:='Zur Zeit: '+old+#10#10+
'Vergrößern: 0,01 bis +5'+#10+
'Verkleinern: - 5 bis -0,01'+#10;
s:= '0,1';
nmal:
oK := InputQuery(s1,s2, s);
if oK = false then exit //abbrechen oder ESC
else begin
nWert:= StrToFloatDef(s,strToFloat(old));
end;
if (nWert<-5) or (nWert>5) then goto nmal;
rvruler1.LeftIndent:= rvruler1.LeftIndent+nWert;
end;
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry, what is your question?

The table position from the left border is defined in LeftIndent and Alignment properties of the paragraph where it is inserted.
j&b
Posts: 184
Joined: Mon Sep 05, 2005 1:35 pm

Post by j&b »

Sergey Tkachenko wrote:Sorry, what is your question?

The table position from the left border is defined in LeftIndent and Alignment properties of the paragraph where it is inserted.

Thank you. With your answere I have solved my problem.
Post Reply