pablocasta
asked on
Right, Left and First Indent problem
I'm trying to set the Right and Left indent of a paragraph. For that I'm using the following code:
procedure TfrmParrafo.Clicks(Sender: TObject; Button: TUDBtnType);
begin
if Sender = UpDown1 then
begin
Edit1.Text := FloatToStr(UpDown1.Positio n) + ' (mm)';
reEjemplo.Paragraph.LeftIn dent := UpDown1.Position;
end
else if Sender = UpDown2 then
begin
Edit2.Text := FloatToStr(UpDown2.Positio n) + ' (mm)';
reEjemplo.Paragraph.RightI ndent := UpDown1.Position
end
else if Sender = UpDown3 then
begin
Edit3.Text := FloatToStr(UpDown3.Positio n) + ' (mm)';
reEjemplo.Paragraph.FirstI ndent := UpDown1.Position
end
end;
What am I doing wrong? 'cause it doesn't work.
PS: I'm also trying to do an undo/redo command. Redo is the problem, is there any way to do it?
Thanks in advance.
procedure TfrmParrafo.Clicks(Sender:
begin
if Sender = UpDown1 then
begin
Edit1.Text := FloatToStr(UpDown1.Positio
reEjemplo.Paragraph.LeftIn
end
else if Sender = UpDown2 then
begin
Edit2.Text := FloatToStr(UpDown2.Positio
reEjemplo.Paragraph.RightI
end
else if Sender = UpDown3 then
begin
Edit3.Text := FloatToStr(UpDown3.Positio
reEjemplo.Paragraph.FirstI
end
end;
What am I doing wrong? 'cause it doesn't work.
PS: I'm also trying to do an undo/redo command. Redo is the problem, is there any way to do it?
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can redo by calling updo again.
Cheers,
Phil.
Cheers,
Phil.
ASKER
I knew some of the things you are telling me, but though, there are some good points you mention I haven't really taken into account.
On one side I wanted to ask what was exactly a pixel, but sbruck has already done that.
On the other one, I corrected the problem Phil mentions, but though the thing works not as I expected.
I'll explain ...
When I change values, text appears like this:
Example text.Example text.Example text.Example
text.
Example text.Example text.Example text.Example text.Example text.Example text.
Example text.Example text.Example text.Example text.Example text.
I mean some words that could be placed in the line before are put down one line. Why does this happen?
On one side I wanted to ask what was exactly a pixel, but sbruck has already done that.
On the other one, I corrected the problem Phil mentions, but though the thing works not as I expected.
I'll explain ...
When I change values, text appears like this:
Example text.Example text.Example text.Example
text.
Example text.Example text.Example text.Example text.Example text.Example text.
Example text.Example text.Example text.Example text.Example text.
I mean some words that could be placed in the line before are put down one line. Why does this happen?
Cheers,
Phil.