?? dlgspellcheck.pas
字號:
unit dlgSpellCheck;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, CorelButton;
type
TSpellCheckDialog = class(TForm)
txtNotFound: TEdit;
Label1: TLabel;
txtChangeTo: TEdit;
Label2: TLabel;
Label3: TLabel;
btnChange: TCorelButton;
btnIgnore: TCorelButton;
btnIgnoreAll: TCorelButton;
btnAdd: TCorelButton;
btnClose: TCorelButton;
lstSuggestions: TListBox;
procedure lstSuggestionsClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure PrepareShow(AEditorRect: TRect;
X, Y1, Y2: integer);
end;
var
SpellCheckDialog: TSpellCheckDialog;
implementation
{$R *.DFM}
uses
uOptVars;
procedure TSpellCheckDialog.lstSuggestionsClick(Sender: TObject);
begin
txtChangeTo.Text := lstSuggestions.Items[lstSuggestions.ItemIndex];
end;
procedure TSpellCheckDialog.FormShow(Sender: TObject);
begin
if lstSuggestions.Items.Count = 0 then begin
lstSuggestions.Items.Add(SSpellNoSugg);
lstSuggestions.Enabled := false;
txtChangeTo.Text := txtNotFound.Text;
end else begin
lstSuggestions.Enabled := true;
lstSuggestions.ItemIndex := 0;
txtChangeTo.Text := lstSuggestions.Items[0];
end;
end;
procedure TSpellCheckDialog.PrepareShow(AEditorRect: TRect;
X, Y1, Y2: integer);
var
nW, nH: integer;
begin
nW := AEditorRect.Right - AEditorRect.Left;
nH := AEditorRect.Bottom - AEditorRect.Top;
if nW <= Width then
X := AEditorRect.Left - (Width - nW) div 2
else begin
if X + Width > AEditorRect.Right then
X := AEditorRect.Right - Width;
end;
if Y2 > AEditorRect.Top + MulDiv(nH, 2, 3) then
Y2 := Y1 - Height - 4
else
Inc(Y2, 4);
SetBounds(X, Y2, Width, Height);
end;
procedure TSpellCheckDialog.FormDestroy(Sender: TObject);
begin
SpellCheckDialog := nil;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -