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: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99:
| unit Wizard;
interface
uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls;
type [ ... ] of object; TWizard = class(TCustomPanel) private [ ... ] protected [ ... ] public constructor Create(AOwner: TComponent); override; [ ... ] procedure ChangeButtons; published property Enabled; property Visible; property Align; property ShowHint; [ ... ] end;
procedure Register;
implementation
Constructor TWizard.Create(AOwner: TComponent); var Button: TButton; Notebook: TNotebook; Bevel: TBevel; begin
inherited;
FTextNext := '&Next >'; FTextBack := '< &Back'; FTextCancel := '&Cancel'; FTextFinish := '&Finish';
Width := 337; Height := 209; BorderWidth := 0;
Notebook := TNotebook.Create(self); Notebook.Height := 160; Notebook.Align := alTop; Notebook.Pages.Strings[0] := '0'; Notebook.Color := clWhite; Notebook.Parent := TWizard(FindComponent(Name)); Notebook.Name := 'MyPages';
Bevel := TBevel.Create(self); Bevel.Top := 161; Bevel.Left := 0; Bevel.Height := 17; Bevel.Shape := bsTopLine; Bevel.Anchors := [akLeft,akRight,akBottom]; Bevel.Parent := TWizard(FindComponent(Name)); Bevel.Name := 'MyBevel';
Button := TButton.Create(self); Button.Top := 171; Button.Left := 16; Button.Height := 25; Button.Width := 83; Button.Anchors := [akRight,akBottom]; Button.Name := 'ButtonBack';
Button := TButton.Create(self); Button.Top := 171; Button.Left := 128; Button.Height := 25; Button.Width := 83; Button.Anchors := [akRight,akBottom]; Button.Name := 'ButtonNext';
Button := TButton.Create(self); Button.Top := 171; Button.Left := 240; Button.Height := 25; Button.Width := 83; Button.Anchors := [akRight,akBottom]; Button.Name := 'ButtonClose';
ChangeButtons;
end;
[ ... ]
end. |