git-svn-id: https://192.168.0.254/svn/Componentes.Terceros.DevExpressVCL@31 05c56307-c608-d34a-929d-697000501d7a
58 lines
1.4 KiB
ObjectPascal
58 lines
1.4 KiB
ObjectPascal
unit RibbonNotepadDemoOptions;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
|
|
Dialogs, StdCtrls;
|
|
|
|
type
|
|
|
|
TScreenTipOptions = record
|
|
ShowScreenTips: Boolean;
|
|
ShowDescripitons: Boolean;
|
|
end;
|
|
|
|
TRibbonDemoOptionsForm = class(TForm)
|
|
cbColorScheme: TComboBox;
|
|
cbScreenTipStyle: TComboBox;
|
|
lblColorScheme: TLabel;
|
|
lblScreenTipStyle: TLabel;
|
|
Button1: TButton;
|
|
Button2: TButton;
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
function GetOptions(var AColorSchemeName: string; var AScreenTipOptions: TScreenTipOptions): Boolean;
|
|
end;
|
|
|
|
var
|
|
RibbonDemoOptionsForm: TRibbonDemoOptionsForm;
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
|
|
function TRibbonDemoOptionsForm.GetOptions(var AColorSchemeName: string; var AScreenTipOptions: TScreenTipOptions): Boolean;
|
|
begin
|
|
cbColorScheme.ItemIndex := cbColorScheme.Items.IndexOf(AColorSchemeName);
|
|
if AScreenTipOptions.ShowScreenTips then
|
|
if AScreenTipOptions.ShowDescripitons then
|
|
cbScreenTipStyle.ItemIndex := 0
|
|
else
|
|
cbScreenTipStyle.ItemIndex := 1
|
|
else
|
|
cbScreenTipStyle.ItemIndex := 2;
|
|
|
|
Result := ShowModal = mrOk;
|
|
|
|
if Result then
|
|
begin
|
|
AColorSchemeName := cbColorScheme.Text;
|
|
AScreenTipOptions.ShowScreenTips := cbScreenTipStyle.ItemIndex <> 2;
|
|
AScreenTipOptions.ShowDescripitons := cbScreenTipStyle.ItemIndex = 0;
|
|
end;
|
|
end;
|
|
|
|
end.
|