unit Unit1;

interface

uses
  System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,
  WEBLib.Forms, WEBLib.Dialogs, Types, Vcl.StdCtrls, WEBLib.StdCtrls, Vcl.Grids, WEBLib.Grids, Vcl.Controls, WEBLib.Buttons, WEBLib.ExtCtrls;

type
  TForm1 = class(TWebForm)
    AnalysisPanel: TWebPanel;
    LBHandedness: TWebLabel;
    LBClubType: TWebLabel;
    LBLieType: TWebLabel;
    LBCamView: TWebLabel;
    LBSkillLevel: TWebLabel;
    LBSetTitle: TWebLabel;
    LBVidFrameRate: TWebLabel;
    LBAnalysisName: TWebLabel;
    AiTopPanel: TWebPanel;
    LbAnalysisTitle: TWebLabel;
    BtnAnalysisClose: TWebSpeedButton;
    CBHandedness: TWebComboBox;
    CBClubType: TWebComboBox;
    CBLieType: TWebComboBox;
    CBCamView: TWebComboBox;
    CBSkillLevel: TWebComboBox;
    SGVideoPositions: TWebStringGrid;
    BtnStartAnalysis: TWebSpeedButton;
    BtnCancelAnalysis: TWebSpeedButton;
    CBVideoFrameRate: TWebComboBox;
    EDAnalysisName: TWebEdit;
    WebButton1: TWebButton;
    procedure WebFormCreate(Sender: TObject);
    procedure WebButton1Click(Sender: TObject);
  private
    { Private declarations }
    procedure SetupFrameSelect;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}


procedure TForm1.SetupFrameSelect;
var i: Integer;
begin

  SGVideoPositions.RowCount := 10;
  SGVideoPositions.ColCount := 3;
  SGVideoPositions.ColWidths[0] := 140;
  SGVideoPositions.ColWidths[1] := 110;
  SGVideoPositions.ColWidths[2] := 90;
  SGVideoPositions.ColAlignments[1] := taCenter;

  SGVideoPositions.FixedTextColor := clNavy;

  SGVideoPositions.Cells[0,0] := 'Position';
  SGVideoPositions.Cells[1,0] := 'Video Frame #';

  SGVideoPositions.Cells[0,1] := 'Address';
  SGVideoPositions.Cells[0,2] := 'Club Parallel';
  SGVideoPositions.Cells[0,3] := 'Lead Arm Parallel';
  SGVideoPositions.Cells[0,4] := 'Top of Backswing';
  SGVideoPositions.Cells[0,5] := 'Lead Arm Parallel DS';
  SGVideoPositions.Cells[0,6] := 'Club Parallel DS';
  SGVideoPositions.Cells[0,7] := 'Impact';
  SGVideoPositions.Cells[0,8] := 'Follow Through';
  SGVideoPositions.Cells[0,9] := 'Finish';

  SGVideoPositions.FixedFont.Name := 'Tahoma';
  SGVideoPositions.FixedFont.Size := 9;
  SGVideoPositions.Font.Name := 'Tahoma';
  SGVideoPositions.Font.Size := 9;

  for i := 0 to SGVideoPositions.RowCount-1 do
  begin
    SGVideoPositions.AddButton(2,i,'Set Frame');
    SGVideoPositions.RowHeights[i] := 26;
  end;


end;


procedure TForm1.WebButton1Click(Sender: TObject);
begin
  AnalysisPanel.Visible := true;
end;

procedure TForm1.WebFormCreate(Sender: TObject);
begin
  SetupFrameSelect;
end;

end.