Page 1 of 1

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

Posted: Thu Jan 22, 2015 5:45 pm
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;

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

Posted: Thu Jan 22, 2015 5:57 pm
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;

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

Posted: Thu Jan 22, 2015 6:05 pm
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 !

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

Posted: Fri Jan 23, 2015 10:33 am
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;

Posted: Fri Jan 23, 2015 7:46 pm
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.

Posted: Sat Jan 24, 2015 1:33 pm
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.