summaryrefslogtreecommitdiff
path: root/examples/gui/customstyles/customstyles.lpr
blob: c1b2442467e2b9ac88ec94125ca60d2fda9f0265 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
program customstyles;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes, fpg_main, frm_test, mystyle;


procedure MainProc;
var
  frm: TTestForm;
begin
  fpgApplication.Initialize;
  frm := TTestForm.Create(nil);
  try
    // Free old and set new style
    if Assigned(fpgStyle) then
      fpgStyle.Free;
    fpgStyle := TMyStyle.Create;
    // now continue with the application
    frm.Show;
    fpgApplication.Run;
  finally
    frm.Free;
  end;
end;

begin
  MainProc;
end.