source: trunk/NewView/InformationFormUnit.pas@ 18

Last change on this file since 18 was 18, checked in by RBRi, 19 years ago

+ newview source

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1Unit InformationFormUnit;
2
3// NewView - a new OS/2 Help Viewer
4// Copyright 2003 Aaron Lawrence (aaronl at consultant dot com)
5// This software is released under the Gnu Public License - see readme.txt
6
7Interface
8
9Uses
10 Classes, Forms, Graphics, StdCtrls, Buttons,
11 ACLLanguageUnit;
12
13Type
14 TInformationForm = Class (TForm)
15 InformationMemo: TMemo;
16 OKButton: TButton;
17 Procedure InformationFormOnSetupShow (Sender: TObject);
18 Procedure InformationFormOnShow (Sender: TObject);
19 Procedure InformationFormOnCreate (Sender: TObject);
20 Private
21 {Insert private declarations here}
22 Public
23 FText: pchar; // for messages with long lines
24 Procedure OnLanguageEvent( Language: TLanguageFile;
25 const Apply: boolean );
26 End;
27
28Var
29 InformationForm: TInformationForm;
30
31Implementation
32
33Uses
34 ControlsUtility;
35
36Procedure TInformationForm.InformationFormOnSetupShow (Sender: TObject);
37Begin
38 ScaleForm( self, 11, 16 );
39
40 InformationMemo.XStretch := xsFrame;
41 InformationMemo.YStretch := ysFrame;
42End;
43
44Procedure TInformationForm.InformationFormOnShow (Sender: TObject);
45Begin
46 if FText <> nil then
47 InformationMemo.Lines.SetText( FText );
48 FText := nil;
49End;
50
51Procedure TInformationForm.InformationFormOnCreate (Sender: TObject);
52Begin
53 RegisterForLanguages( OnLanguageEvent );
54End;
55
56Procedure TInformationForm.OnLanguageEvent( Language: TLanguageFile;
57 const Apply: boolean );
58begin
59 Language.LoadComponentLanguage( self, Apply );
60end;
61
62Initialization
63 RegisterClasses ([TInformationForm, TMemo, TButton]);
64End.
Note: See TracBrowser for help on using the repository browser.