home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best of German Only 1
/
romside_best_of_german_only_1.iso
/
wissen
/
dos
/
wgraph
/
entpack.exe
/
WGBSP!.EXE
/
BSP20.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-12-05
|
2KB
|
94 lines
program Beispiel20;
uses GDecl,
GEvent,
GViews,
GDlg,
GApp,
Graph;
const cmDialog = 101;
type TApplication=object(TApp)
procedure InitMenuBar; virtual;
procedure SetDialogData; virtual;
procedure HandleEvent; virtual;
procedure DialogWindow;
end;
tDialogData=record
Schalter:string[19];
end;
var MyProg:TApplication;
PrintDialogData:tDialogData;
{Implementation TApplication}
procedure TApplication.InitMenuBar;
begin
Palette[1]:=#14;
Palette[5]:=#14;
Palette[4]:=#4;
Palette[12]:=#4;
MainMenu('~F~enster',0);
SubMenu('~D~ialogfenster',cmDialog,0,0,false,false);
SubMenu('E~x~it Alt-X',cmCloseApplication,0,altX,false,false);
end;
procedure TApplication.SetDialogData;
begin
with PrintDialogData do Schalter:='TTGRrrrrGrRrCGcccS';
end;
procedure TApplication.HandleEvent;
begin
Heap^.ShowHeapStatus(523,8,White);
TProgram.HandleEvent;
case Event.Command of
cmDialog : DialogWindow;
end; {case}
end;
procedure TApplication.DialogWindow;
var R:TRect;
Window:PDlgWindow;
begin
R.Assign(60,80,440,390);
Window:=new(PDlgWindow, Init(R,'Beispiel 20 : Radio- und Checkbuttons',winDouble+winPanel));
with Window^ do
begin
SetPushButton(190,270,80,22,'OK',cmCloseWindow);
SetPushButton(285,270,80,22,'Abbrechen',cmNothing);
SetGroupFrame(20,40,180,140,'Druckertyp',NormWidth);
SetRadioButton(40,70,'~M~atrixdrucker',1);
SetRadioButton(40,90,'~L~aserdrucker',1);
SetRadioButton(40,110,'~T~ypenraddrucker',1);
SetRadioButton(40,130,'~B~ubble-Jet',1);
SetRadioButton(40,150,'T~h~ermodrucker',1);
SetGroupFrame(220,40,135,90,'Auflösung',NormWidth);
SetRadioButton(240,70,'~3~00 dpi',2);
SetRadioButton(240,90,'~1~60 dpi',2);
SetRadioButton(240,110,' ~7~5 dpi',2);
SetCheckButton(225,165,'~E~inzelblatt');
SetGroupFrame(20,200,155,88,'',ThickWidth);
SetCheckButton(40,225,'~F~ett');
SetCheckButton(40,245,'~K~ursiv');
SetCheckButton(40,265,'~U~nterstrichen');
SetStaticText(195,210,'Drucker-Dialog',LeftText);
SetTextParameters(TSCRFont,HorizDir,1);
ChangePalColor(10,Red);
SetData(PrintDialogData);
end;
InsertDesktop(Window);
end;
{--- Hauptprogramm ---}
begin
MyProg.Init('Beispiel 20');
MyProg.Run;
MyProg.Done;
end.