Advertisement
Matixs

Untitled

May 31st, 2023
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 2.60 KB | None | 0 0
  1. unit HelpView;
  2.  
  3. interface
  4.  
  5. uses
  6.   Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
  7.   Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls,
  8.   Vcl.Imaging.pngimage, Vcl.ExtCtrls;
  9.  
  10. type
  11.   THelpFrame = class(TFrame)
  12.     GroupBox1: TGroupBox;
  13.     GroupBox2: TGroupBox;
  14.     GroupBox3: TGroupBox;
  15.     PageControl1: TPageControl;
  16.     Image1: TImage;
  17.     Label1: TLabel;
  18.     Image2: TImage;
  19.     Label2: TLabel;
  20.     Label3: TLabel;
  21.     Image3: TImage;
  22.     Image4: TImage;
  23.     Label4: TLabel;
  24.     Image5: TImage;
  25.     Label5: TLabel;
  26.     Image6: TImage;
  27.     Label6: TLabel;
  28.     Label7: TLabel;
  29.     Image7: TImage;
  30.     Shape1: TShape;
  31.     TabSheet1: TTabSheet;
  32.     TabSheet2: TTabSheet;
  33.     TabSheet3: TTabSheet;
  34.     TabSheet4: TTabSheet;
  35.     TabSheet5: TTabSheet;
  36.     TabSheet6: TTabSheet;
  37.     TabSheet7: TTabSheet;
  38.     Label8: TLabel;
  39.     Label9: TLabel;
  40.     Label10: TLabel;
  41.     Label11: TLabel;
  42.     Label12: TLabel;
  43.     Label13: TLabel;
  44.     Label14: TLabel;
  45.     procedure Label1Click(Sender: TObject);
  46.     procedure Label2Click(Sender: TObject);
  47.     procedure Label3Click(Sender: TObject);
  48.     procedure Label4Click(Sender: TObject);
  49.     procedure Label5Click(Sender: TObject);
  50.     procedure Label6Click(Sender: TObject);
  51.     procedure Label7Click(Sender: TObject);
  52.   private
  53.     { Private declarations }
  54.   public
  55.     { Public declarations }
  56.   end;
  57.  
  58. implementation
  59.  
  60. {$R *.dfm}
  61.  
  62. Procedure FillShape(Shape : TShape; Sender : TObject);
  63. begin
  64.     Shape.Visible := True;
  65.     Shape.Top := (Sender as TLabel).Top + 50;
  66.     Shape.Width := (Sender as TLabel).Width;
  67. end;
  68.  
  69. procedure THelpFrame.Label1Click(Sender: TObject);
  70. begin
  71.     FillShape(Shape1, Sender);
  72.     PageControl1.ActivePageIndex := 0;
  73. end;
  74.  
  75. procedure THelpFrame.Label2Click(Sender: TObject);
  76. begin
  77.     FillShape(Shape1, Sender);
  78.     PageControl1.ActivePageIndex := 1;
  79. end;
  80.  
  81. procedure THelpFrame.Label3Click(Sender: TObject);
  82. begin
  83.     FillShape(Shape1, Sender);
  84.     PageControl1.ActivePageIndex := 2;
  85. end;
  86.  
  87. procedure THelpFrame.Label4Click(Sender: TObject);
  88. begin
  89.     FillShape(Shape1, Sender);
  90.     PageControl1.ActivePageIndex := 3;
  91. end;
  92.  
  93. procedure THelpFrame.Label5Click(Sender: TObject);
  94. begin
  95.     FillShape(Shape1, Sender);
  96.     PageControl1.ActivePageIndex := 4;
  97. end;
  98.  
  99. procedure THelpFrame.Label6Click(Sender: TObject);
  100. begin
  101.     FillShape(Shape1, Sender);
  102.     PageControl1.ActivePageIndex := 5;
  103. end;
  104.  
  105. procedure THelpFrame.Label7Click(Sender: TObject);
  106. begin
  107.     FillShape(Shape1, Sender);
  108.     PageControl1.ActivePageIndex := 6;
  109. end;
  110.  
  111. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement