procedure TForm4.EditorSelectionChange(Sender: TObject);
begin try
SpeedButton1.Enabled := (Editor.SelLength>0);
SpeedButton2.Enabled := SpeedButton1.Enabled;
SpeedButton3.Enabled := SpeedButton1.Enabled;
with Editor.Paragraph do try
FUpdating := True;
SpeedButton8.Enabled := (Editor.SelLength>0);
Copy1.Enabled := (Editor.SelLength>0);
Cut1.Enabled := (Editor.SelLength>0);
SpeedButton10.Enabled := SpeedButton8.Enabled;
UpDown1.Position := Editor.SelAttributes.Size;
JvFontComboBox1.FontName := Editor.SelAttributes.Name;
case Ord(Alignment) of
0: SpeedButton4.Down := True;
1: SpeedButton5.Down := True;
2: SpeedButton6.Down := True;
end;
finally
FUpdating := False;
end;
except end;End; |