RibbonNotepadDemoMain.pas
上传用户:yjb1804
上传日期:2021-01-30
资源大小:3105k
文件大小:16k
源码类别:

Email服务器

开发平台:

Delphi

  1. unit RibbonNotepadDemoMain;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  5.   ExtCtrls, ComCtrls, dxBar, StdCtrls, dxBarExtItems, cxControls,
  6.   ImgList, ActnList, cxLookAndFeels, dxStatusBar, cxGraphics, EBarsUtils,
  7.   dxRibbonForm, dxRibbon, cxClasses, Menus, dxRibbonStatusBar, cxStyles,
  8.   OleCtrls, SHDocVw, uHtmlEdit, ExtDlgs;
  9. type
  10.   TRibbonDemoMainForm = class(TdxRibbonForm)
  11.     BarManager: TdxBarManager;
  12.     dxBarButtonNew: TdxBarLargeButton;
  13.     dxBarButtonOpen: TdxBarLargeButton;
  14.     dxBarButtonSave: TdxBarLargeButton;
  15.     dxBarSubItemSaveAs: TdxBarSubItem;
  16.     dxBarButtonSaveAsRTF: TdxBarButton;
  17.     dxBarButtonSaveAsText: TdxBarButton;
  18.     dxBarButtonPrint: TdxBarLargeButton;
  19.     dxBarButtonExit: TdxBarLargeButton;
  20.     dxBarButtonUndo: TdxBarLargeButton;
  21.     dxBarButtonCut: TdxBarLargeButton;
  22.     dxBarButtonCopy: TdxBarLargeButton;
  23.     dxBarButtonPaste: TdxBarLargeButton;
  24.     dxBarButtonClear: TdxBarLargeButton;
  25.     dxBarButtonSelectAll: TdxBarLargeButton;
  26.     dxBarButtonFind: TdxBarLargeButton;
  27.     dxBarButtonReplace: TdxBarLargeButton;
  28.     dxBarComboFontSize: TdxBarCombo;
  29.     dxBarButtonBold: TdxBarLargeButton;
  30.     dxBarButtonItalic: TdxBarLargeButton;
  31.     dxBarButtonUnderline: TdxBarLargeButton;
  32.     dxBarButtonBullets: TdxBarLargeButton;
  33.     dxBarButtonProtected: TdxBarLargeButton;
  34.     dxBarButtonAlignLeft: TdxBarLargeButton;
  35.     dxBarButtonCenter: TdxBarLargeButton;
  36.     dxBarButtonAlignRight: TdxBarLargeButton;
  37.     dxBarButtonFont: TdxBarLargeButton;
  38.     dxBarSeparator: TdxBarSeparator;
  39.     OpenDialog: TOpenDialog;
  40.     SaveDialog: TSaveDialog;
  41.     PrintDialog: TPrintDialog;
  42.     FontDialog: TFontDialog;
  43.     dxBarPopupMenu: TdxRibbonPopupMenu;
  44.     dxBarComboFontColor: TdxBarColorCombo;
  45.     dxBarGroup1: TdxBarGroup;
  46.     dxBarButton1: TdxBarLargeButton;
  47.     dxBarComboFontName: TdxBarFontNameCombo;
  48.     ilStatusBarImages: TImageList;
  49.     dxStatusBar: TdxRibbonStatusBar;
  50.     FindDialog: TFindDialog;
  51.     ReplaceDialog: TReplaceDialog;
  52.     tabHome: TdxRibbonTab;
  53.     Ribbon: TdxRibbon;
  54.     tabAppearance: TdxRibbonTab;
  55.     BarManagerBar5: TdxBar;
  56.     BarManagerBar7: TdxBar;
  57.     ApplicationMenu: TdxBarApplicationMenu;
  58.     BarManagerBar8: TdxBar;
  59.     BarManagerBar1: TdxBar;
  60.     dxBarLargeButton3: TdxBarLargeButton;
  61.     dxBarLargeButton4: TdxBarLargeButton;
  62.     dxBarLargeButton5: TdxBarLargeButton;
  63.     dxBarLargeButton6: TdxBarLargeButton;
  64.     dxBarLargeButton7: TdxBarLargeButton;
  65.     BarManagerBar10: TdxBar;
  66.     dxBarLargeButton8: TdxBarLargeButton;
  67.     dxBarLargeButton9: TdxBarLargeButton;
  68.     dxBarLargeButton10: TdxBarLargeButton;
  69.     BarManagerBar12: TdxBar;
  70.     dxBarScreenTipRepository1: TdxBarScreenTipRepository;
  71.     cxLargeImages: TcxImageList;
  72.     cxSmallImages: TcxImageList;
  73.     BarManagerBar6: TdxBar;
  74.     BarManagerBar13: TdxBar;
  75.     btnLineNumber: TdxBarButton;
  76.     btnColumnNumber: TdxBarButton;
  77.     btnLocked: TdxBarButton;
  78.     stModified: TdxBarStatic;
  79.     stFontDialog: TdxBarScreenTip;
  80.     stHelpButton: TdxBarScreenTip;
  81.     HtmlEdit: THtmlEdit;
  82.     ActionListButton: TActionList;
  83.     Act_New: TAction;
  84.     Act_Open: TAction;
  85.     Act_Save: TAction;
  86.     Act_SaveAs: TAction;
  87.     Act_SaveTo: TAction;
  88.     Act_Clear: TAction;
  89.     Act_Redo: TAction;
  90.     Act_Undo: TAction;
  91.     Act_SelectAll: TAction;
  92.     Act_Print: TAction;
  93.     Act_PageSetup: TAction;
  94.     Act_PrintPreview: TAction;
  95.     Act_Write: TAction;
  96.     Act_Copy: TAction;
  97.     Act_Cut: TAction;
  98.     Act_Paste: TAction;
  99.     Act_Insert: TAction;
  100.     Act_Append: TAction;
  101.     Act_ViewSource: TAction;
  102.     Act_ViewText: TAction;
  103.     Act_Edit_BackColoer: TAction;
  104.     Act_Edit_Bold: TAction;
  105.     Act_Edit_CreateLink: TAction;
  106.     Act_Edit_ForeColor: TAction;
  107.     Act_Edit_HorizontalRule: TAction;
  108.     Act_Edit_InsertImage: TAction;
  109.     Act_Edit_InsertLineBreak: TAction;
  110.     Act_Edit_InsertOrderedlist: TAction;
  111.     Act_Edit_InsertTable: TAction;
  112.     Act_Edit_InsertUnOrderedList: TAction;
  113.     Act_Edit_JustifyCenter: TAction;
  114.     Act_Edit_JustifyFull: TAction;
  115.     Act_Edit_JustifyLeft: TAction;
  116.     Act_Edit_JustifyRight: TAction;
  117.     Act_Edit_Italic: TAction;
  118.     Act_Edit_RemoveFormat: TAction;
  119.     Act_Edit_ScrollToBottom: TAction;
  120.     Act_Edit_ScrollToTop: TAction;
  121.     Act_Edit_OutDent: TAction;
  122.     Act_Edit_InDent: TAction;
  123.     Act_Edit_SuperScript: TAction;
  124.     Act_Edit_SubScript: TAction;
  125.     Act_Edit_UnderLine: TAction;
  126.     Act_Edit_StrikeThrough: TAction;
  127.     Act_Exit: TAction;
  128.     Act_Help: TAction;
  129.     Act_About: TAction;
  130.     Act_M_ExampleWindow: TAction;
  131.     Act_M_ExampleButton: TAction;
  132.     dlgOpenPic: TOpenPictureDialog;
  133.     tabInsert: TdxRibbonTab;
  134.     tabTable: TdxRibbonTab;
  135.     dxBarButton2: TdxBarButton;
  136.     procedure FormCreate(Sender: TObject);
  137.     procedure dxBarLargeButton8Click(Sender: TObject);
  138.     procedure dxBarLargeButton9Click(Sender: TObject);
  139.     procedure dxBarLargeButton7Click(Sender: TObject);
  140.     procedure RibbonResize(Sender: TObject);
  141.     procedure RibbonHelpButtonClick(Sender: TdxCustomRibbon);
  142.     procedure Act_NewExecute(Sender: TObject);
  143.     procedure Act_OpenExecute(Sender: TObject);
  144.     procedure Act_SaveExecute(Sender: TObject);
  145.     procedure Act_SaveAsExecute(Sender: TObject);
  146.     procedure Act_SaveToExecute(Sender: TObject);
  147.     procedure Act_ClearExecute(Sender: TObject);
  148.     procedure Act_RedoExecute(Sender: TObject);
  149.     procedure Act_UndoExecute(Sender: TObject);
  150.     procedure Act_SelectAllExecute(Sender: TObject);
  151.     procedure Act_PrintExecute(Sender: TObject);
  152.     procedure Act_PageSetupExecute(Sender: TObject);
  153.     procedure Act_PrintPreviewExecute(Sender: TObject);
  154.     procedure Act_WriteExecute(Sender: TObject);
  155.     procedure Act_CopyExecute(Sender: TObject);
  156.     procedure Act_CutExecute(Sender: TObject);
  157.     procedure Act_PasteExecute(Sender: TObject);
  158.     procedure Act_Edit_BoldExecute(Sender: TObject);
  159.     procedure Act_Edit_CreateLinkExecute(Sender: TObject);
  160.     procedure Act_Edit_ForeColorExecute(Sender: TObject);
  161.     procedure Act_Edit_HorizontalRuleExecute(Sender: TObject);
  162.     procedure Act_Edit_InsertImageExecute(Sender: TObject);
  163.     procedure Act_Edit_InsertLineBreakExecute(Sender: TObject);
  164.     procedure Act_Edit_InsertOrderedlistExecute(Sender: TObject);
  165.     procedure Act_Edit_InsertTableExecute(Sender: TObject);
  166.     procedure Act_Edit_InsertUnOrderedListExecute(Sender: TObject);
  167.     procedure Act_Edit_JustifyCenterExecute(Sender: TObject);
  168.     procedure Act_Edit_JustifyFullExecute(Sender: TObject);
  169.     procedure Act_Edit_JustifyLeftExecute(Sender: TObject);
  170.     procedure Act_Edit_JustifyRightExecute(Sender: TObject);
  171.     procedure Act_Edit_ItalicExecute(Sender: TObject);
  172.     procedure Act_Edit_RemoveFormatExecute(Sender: TObject);
  173.     procedure Act_Edit_ScrollToBottomExecute(Sender: TObject);
  174.     procedure Act_Edit_ScrollToTopExecute(Sender: TObject);
  175.     procedure Act_Edit_OutDentExecute(Sender: TObject);
  176.     procedure Act_Edit_InDentExecute(Sender: TObject);
  177.     procedure Act_Edit_SuperScriptExecute(Sender: TObject);
  178.     procedure Act_Edit_SubScriptExecute(Sender: TObject);
  179.     procedure Act_Edit_UnderLineExecute(Sender: TObject);
  180.     procedure Act_Edit_StrikeThroughExecute(Sender: TObject);
  181.     procedure Act_ExitExecute(Sender: TObject);
  182.     procedure Act_FontNameExecute(Sender: TObject);
  183.     procedure Act_FontSizeExecute(Sender: TObject);
  184.     procedure dxBarLargeButton3Click(Sender: TObject);
  185.     procedure dxBarLargeButton4Click(Sender: TObject);
  186.     procedure dxBarLargeButton5Click(Sender: TObject);
  187.   private
  188.     FFileName: string;
  189.     procedure SetFileName(Value: string);
  190.   public
  191.     procedure SetColorScheme(const AName: string);
  192.     procedure ShowItems(AShow: Boolean);
  193.     property FileName: string read FFileName write SetFileName;
  194.   end;
  195. var
  196.   RibbonDemoMainForm: TRibbonDemoMainForm;
  197. implementation
  198. {$R *.DFM}
  199. {$R windowsxp.res}
  200. uses
  201.   RichEdit, RibbonDemoAbout;
  202. const
  203.   sRichEditFoundResultCaption = 'Information';
  204.   sRichEditTextNotFound = 'The search text is not found.';
  205.   sRichEditReplaceAllResult = 'Replaced %d occurances.';
  206.   sDefaultDocName = 'Document1.rtf';
  207.   RTFFilter = 'Rich Text Files (*.RTF)|*.RTF';
  208.   TXTFilter = 'Plain text (*.TXT)|*.TXT';
  209. function EnumFontsProc(var LogFont: TLogFont; var TextMetric: TTextMetric;
  210.   FontType: Integer; Data: Pointer): Integer; stdcall;
  211. begin
  212.   TStrings(Data).Add(LogFont.lfFaceName);
  213.   Result := 1;
  214. end;
  215. procedure TRibbonDemoMainForm.SetFileName(Value: string);
  216. var
  217.   AIndex: Integer;
  218. begin
  219.   Ribbon.DocumentName := ExtractFileName(Value);
  220.   FFileName := Value;
  221.   if FileExists(FFileName) then
  222.   begin
  223.     AIndex := ApplicationMenu.ExtraPaneItems.IndexOf(FFileName);
  224.     if AIndex > -1 then
  225.       ApplicationMenu.ExtraPaneItems.Delete(AIndex);
  226.     ApplicationMenu.ExtraPaneItems.Insert(0).Text := FFileName;
  227.   end;
  228. end;
  229. procedure TRibbonDemoMainForm.RibbonResize(Sender: TObject);
  230. const
  231.   Space = 8;
  232. begin
  233.   if Ribbon.QuickAccessToolbar.Position = qtpAboveRibbon then
  234.     dxBarLargeButton8.Down := True
  235.   else
  236.     dxBarLargeButton9.Down := True;
  237. end;
  238. procedure TRibbonDemoMainForm.SetColorScheme(const AName: string);
  239. begin
  240.   Ribbon.ColorSchemeName := AName;
  241.   dxStatusBar.Invalidate;
  242. end;
  243. procedure TRibbonDemoMainForm.ShowItems(AShow: Boolean);
  244. begin
  245.   BarManager.LockUpdate := True;
  246.   try
  247.     if not AShow then
  248.     begin
  249.       btnLineNumber.Caption := '';
  250.       btnColumnNumber.Caption := '';
  251.       stModified.Caption := '';
  252.     end;
  253.     BarManager.Groups[0].Enabled := AShow;
  254.   finally
  255.     BarManager.LockUpdate := False;
  256.   end;
  257. end;
  258. procedure TRibbonDemoMainForm.FormCreate(Sender: TObject);
  259. begin
  260.   dmCommonData.AboutFormClass := TRibbonDemoAboutForm;
  261.   HtmlEdit.Align := alClient;
  262.   //  OpenDialog.Filter := RTFFilter;
  263.   OpenDialog.InitialDir := ExtractFilePath(ParamStr(0));
  264.   SaveDialog.InitialDir := OpenDialog.InitialDir;
  265.   HtmlEdit.ImageFolder := ExtractFilePath(ParamStr(0)) + 'Images';
  266.   ShowItems(True);
  267. end;
  268. procedure TRibbonDemoMainForm.dxBarLargeButton7Click(Sender: TObject);
  269. begin
  270.   Ribbon.ApplicationButton.Visible := not Ribbon.ApplicationButton.Visible;
  271. end;
  272. procedure TRibbonDemoMainForm.dxBarLargeButton8Click(Sender: TObject);
  273. begin
  274.   Ribbon.QuickAccessToolbar.Position := qtpAboveRibbon;
  275. end;
  276. procedure TRibbonDemoMainForm.dxBarLargeButton9Click(Sender: TObject);
  277. begin
  278.   Ribbon.QuickAccessToolbar.Position := qtpBelowRibbon;
  279. end;
  280. procedure TRibbonDemoMainForm.RibbonHelpButtonClick(
  281.   Sender: TdxCustomRibbon);
  282. begin
  283.   ShowMessage('Clicked!');
  284. end;
  285. procedure TRibbonDemoMainForm.Act_NewExecute(Sender: TObject);
  286. begin
  287.   HtmlEdit.New;
  288. end;
  289. procedure TRibbonDemoMainForm.Act_ExitExecute(Sender: TObject);
  290. begin
  291.   Close;
  292. end;
  293. procedure TRibbonDemoMainForm.Act_FontNameExecute(Sender: TObject);
  294. begin
  295.   if dxBarComboFontName.Text <> '' then
  296.     HtmlEdit.Edit.FontName(dxBarComboFontName.Text);
  297. end;
  298. procedure TRibbonDemoMainForm.Act_FontSizeExecute(Sender: TObject);
  299. begin
  300.   HtmlEdit.Edit.FontSize(dxBarComboFontSize.ItemIndex + 1);
  301. end;
  302. procedure TRibbonDemoMainForm.Act_OpenExecute(Sender: TObject);
  303. begin
  304.   if OpenDialog.Execute then
  305.     HtmlEdit.Open(OpenDialog.FileName);
  306. end;
  307. procedure TRibbonDemoMainForm.Act_PasteExecute(Sender: TObject);
  308. begin
  309.   HtmlEdit.Paste;
  310. end;
  311. procedure TRibbonDemoMainForm.Act_PrintExecute(Sender: TObject);
  312. begin
  313.   HtmlEdit.Print;
  314. end;
  315. procedure TRibbonDemoMainForm.Act_PrintPreviewExecute(Sender: TObject);
  316. begin
  317.   HtmlEdit.PrintPreview;
  318. end;
  319. procedure TRibbonDemoMainForm.Act_RedoExecute(Sender: TObject);
  320. begin
  321.   HtmlEdit.Redo;
  322. end;
  323. procedure TRibbonDemoMainForm.Act_SaveExecute(Sender: TObject);
  324. begin
  325.   HtmlEdit.Save;
  326. end;
  327. procedure TRibbonDemoMainForm.Act_SelectAllExecute(Sender: TObject);
  328. begin
  329.   HtmlEdit.SelectAll;
  330. end;
  331. procedure TRibbonDemoMainForm.Act_UndoExecute(Sender: TObject);
  332. begin
  333.   HtmlEdit.Undo;
  334. end;
  335. procedure TRibbonDemoMainForm.Act_SaveAsExecute(Sender: TObject);
  336. begin
  337.   HtmlEdit.SaveAs;
  338. end;
  339. procedure TRibbonDemoMainForm.Act_SaveToExecute(Sender: TObject);
  340. begin
  341.   if SaveDialog.Execute then
  342.     HtmlEdit.SaveToFile(SaveDialog.FileName);
  343. end;
  344. procedure TRibbonDemoMainForm.Act_PageSetupExecute(Sender: TObject);
  345. begin
  346.   HtmlEdit.PrintPageSetup;
  347. end;
  348. procedure TRibbonDemoMainForm.Act_ClearExecute(Sender: TObject);
  349. begin
  350.   HtmlEdit.Clear;
  351. end;
  352. procedure TRibbonDemoMainForm.Act_WriteExecute(Sender: TObject);
  353. var
  354.   strTable: string;
  355.   RowCnt, ColCnt: integer;
  356. begin
  357.   strTable := '<TABLE border=1 >';
  358.   for RowCnt := 1 to 3 do
  359.   begin
  360.     strTable := strTable + '<TR>';
  361.     for ColCnt := 1 to 5 do
  362.       strTable := strTable + '<TD>&nbsp;</TD>';
  363.     strTable := strTable + '</TR>';
  364.   end;
  365.   strTable := strTable + '</TABLE>';
  366.   HtmlEdit.Write(strTable);
  367. end;
  368. procedure TRibbonDemoMainForm.Act_CopyExecute(Sender: TObject);
  369. begin
  370.   HtmlEdit.Copy;
  371. end;
  372. procedure TRibbonDemoMainForm.Act_CutExecute(Sender: TObject);
  373. begin
  374.   HtmlEdit.Cut;
  375. end;
  376. procedure TRibbonDemoMainForm.Act_Edit_BoldExecute(Sender: TObject);
  377. begin
  378.   HtmlEdit.Edit.Bold;
  379. end;
  380. procedure TRibbonDemoMainForm.Act_Edit_CreateLinkExecute(Sender: TObject);
  381. begin
  382.   HtmlEdit.Edit.CreateLink;
  383. end;
  384. procedure TRibbonDemoMainForm.Act_Edit_HorizontalRuleExecute(Sender: TObject);
  385. begin
  386.   HtmlEdit.Edit.InsertHorizontalRule;
  387. end;
  388. procedure TRibbonDemoMainForm.Act_Edit_ForeColorExecute(Sender: TObject);
  389. begin
  390.   HtmlEdit.Edit.ForeColor(dxBarComboFontColor.Color);
  391. end;
  392. procedure TRibbonDemoMainForm.Act_Edit_InsertImageExecute(Sender: TObject);
  393. begin
  394.   if dlgOpenPic.Execute then
  395.     HtmlEdit.Edit.InsertImage(dlgOpenPic.FileName);
  396. end;
  397. procedure TRibbonDemoMainForm.Act_Edit_InsertLineBreakExecute(Sender: TObject);
  398. begin
  399.   HtmlEdit.Edit.InsertLineBreak;
  400. end;
  401. procedure TRibbonDemoMainForm.Act_Edit_InsertOrderedlistExecute(Sender:
  402.   TObject);
  403. begin
  404.   HtmlEdit.Edit.InsertOrderedList;
  405. end;
  406. procedure TRibbonDemoMainForm.Act_Edit_InsertTableExecute(Sender: TObject);
  407. begin
  408.   //HtmlEdit.Edit.InsertTable(StrToInt(edt2.Text), StrToInt(edt3.Text));
  409. end;
  410. procedure TRibbonDemoMainForm.Act_Edit_InsertUnOrderedListExecute(
  411.   Sender: TObject);
  412. begin
  413.   HtmlEdit.Edit.InsertUnOrderedList;
  414. end;
  415. procedure TRibbonDemoMainForm.Act_Edit_JustifyCenterExecute(Sender: TObject);
  416. begin
  417.   HtmlEdit.Edit.JustifyCenter;
  418. end;
  419. procedure TRibbonDemoMainForm.Act_Edit_JustifyFullExecute(Sender: TObject);
  420. begin
  421.   HtmlEdit.Edit.JustifyFull;
  422. end;
  423. procedure TRibbonDemoMainForm.Act_Edit_JustifyLeftExecute(Sender: TObject);
  424. begin
  425.   HtmlEdit.Edit.JustifyLeft;
  426. end;
  427. procedure TRibbonDemoMainForm.Act_Edit_JustifyRightExecute(Sender: TObject);
  428. begin
  429.   HtmlEdit.Edit.JustifyRight;
  430. end;
  431. procedure TRibbonDemoMainForm.Act_Edit_ItalicExecute(Sender: TObject);
  432. begin
  433.   HtmlEdit.Edit.Italic;
  434. end;
  435. procedure TRibbonDemoMainForm.Act_Edit_RemoveFormatExecute(Sender: TObject);
  436. begin
  437.   HtmlEdit.Edit.RemoveFormat;
  438. end;
  439. procedure TRibbonDemoMainForm.Act_Edit_ScrollToBottomExecute(Sender: TObject);
  440. begin
  441.   HtmlEdit.Edit.ScrollToBottom;
  442. end;
  443. procedure TRibbonDemoMainForm.Act_Edit_ScrollToTopExecute(Sender: TObject);
  444. begin
  445.   HtmlEdit.Edit.ScrollToTop;
  446. end;
  447. procedure TRibbonDemoMainForm.Act_Edit_OutDentExecute(Sender: TObject);
  448. begin
  449.   HtmlEdit.Edit.OutDent;
  450. end;
  451. procedure TRibbonDemoMainForm.Act_Edit_InDentExecute(Sender: TObject);
  452. begin
  453.   HtmlEdit.Edit.InDent;
  454. end;
  455. procedure TRibbonDemoMainForm.Act_Edit_SuperScriptExecute(Sender: TObject);
  456. begin
  457.   HtmlEdit.Edit.SuperScript;
  458. end;
  459. procedure TRibbonDemoMainForm.Act_Edit_SubScriptExecute(Sender: TObject);
  460. begin
  461.   HtmlEdit.Edit.SubScript;
  462. end;
  463. procedure TRibbonDemoMainForm.Act_Edit_UnderLineExecute(Sender: TObject);
  464. begin
  465.   HtmlEdit.Edit.UnderLine;
  466. end;
  467. procedure TRibbonDemoMainForm.Act_Edit_StrikeThroughExecute(Sender: TObject);
  468. begin
  469.   HtmlEdit.Edit.StrikeThrough;
  470. end;
  471. procedure TRibbonDemoMainForm.dxBarLargeButton3Click(Sender: TObject);
  472. begin
  473.   SetColorScheme('Blue');
  474. end;
  475. procedure TRibbonDemoMainForm.dxBarLargeButton4Click(Sender: TObject);
  476. begin
  477.   SetColorScheme('Black');
  478. end;
  479. procedure TRibbonDemoMainForm.dxBarLargeButton5Click(Sender: TObject);
  480. begin
  481.   SetColorScheme('Silver');
  482. end;
  483. end.