Fix polymorphic drawing example
This commit is contained in:
parent
18f01a9ebc
commit
a8c63d1f5a
@ -5,7 +5,7 @@ unit drawing;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Controls, ExtCtrls, Graphics;
|
||||
Classes, Controls, Graphics;
|
||||
|
||||
type TDrawing = class(TGraphicControl)
|
||||
private
|
||||
|
@ -39,6 +39,7 @@
|
||||
<Filename Value="drawingdisplay.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
|
@ -5,14 +5,14 @@ unit drawingdisplay;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, drawing;
|
||||
Forms, ExtCtrls, drawing;
|
||||
type
|
||||
{ TForm1 }
|
||||
TForm1 = class(TForm)
|
||||
rgShape: TRadioGroup;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure rgShapeClick(Sender: TObject);
|
||||
private
|
||||
rgShape: TRadioGroup;
|
||||
FDrawing: TDrawing;
|
||||
procedure CreateANewDrawing;
|
||||
public
|
||||
@ -25,6 +25,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
procedure TForm1.CreateANewDrawing;
|
||||
begin
|
||||
if (rgShape.ItemIndex < 0) then Exit;
|
||||
@ -56,7 +58,5 @@ begin
|
||||
CreateANewDrawing;
|
||||
end;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user