Get selected image index

I am using the following to create some TWebImageControls at runtime.

procedure TForm7.WebHttpRequestImagesRequestResponse(Sender: TObject;
  ARequest: TJSXMLHttpRequestRecord; AResponse: string);
  i: integer;
  json: TJSON;
  jobject,jobject2: TJSONObject;
  playerNameString : String;
  playerName : TWebMultimediaPlayer;
  playerNameImage : TWebImageControl;
  playerLabel,playerLabelImage : TWebLabel;
  playerPanel,playerPanelImage : TWebPanel;
  grdItem,gridItemImage: TWebResponsiveGridPanel;

    json := TJSON.Create;
    jArrayImages := TJSONArray(json.Parse(AResponse));
    for i := 0 to jArrayImages.Count - 1 do
    jobject := TJSONObject(jArrayImages.Items[i]);
    playerPanelImage := TWebPanel.Create(self);
    playerNameImage := TWebImageControl.Create(self);
    playerLabelImage := TWebLabel.Create(self);
    playerPanelImage.WidthStyle := ssPercent;
    playerPanelImage.WidthPercent := 100;
    playerPanelImage.left := 100; := 100;
    playerPanelImage.height := 600;
    playerPanelImage.visible := true;
    playerPanelImage.Color := clRed;
    playerPanelImage.ElementClassName := 'WebCSSClassShadow';
    playerNameImage.ElementClassName :=  'WebClassPadding';
    playerLabelImage.ElementClassName :=  'WebClassPadding';
    playerNameImage.Align := alClient;
    playerNameImage.visible := true;
    playerLabelImage.Caption :=  jobject.GetJSONValue('Picture');
    playerNameImage.Parent := playerPanelImage;
    playerLabelImage.Parent := playerPanelImage;
    playerPanelImage.Parent := WebResponsiveGridPanel3;
    playerLabelImage.Align := alBottom;
    playerLabelImage.height := 10;
    playerLabelImage.visible := true;
    playerNameImage.URL :=  ''+ jobject.GetJSONValue('Picture');
    playerLabelImage.Caption := jobject.GetJSONValue('Picture');
    playerNameImage.OnClick := WebButton1Click;


      // populate images

   // WebImageSlider1.RefreshImages;

I need to be able to get the index of the image clicked.

ie playerNameImage.OnClick := showmessage(WebResponsiveGridPanel3.index.clicked)

Is this proper available.

I need this so I can set the WebSliderImage index to match the index of the image selected.

I ended up replacing my code with an ImageSlider on the main page.

Is there a way to add a caption to each of the sliders ( so I can show the filename )

At this moment, there is not a built-in setting to add an image filename to TWebImageSlider images. This is a good suggestion we'll consider.

For the TWebResponsiveGridPanel with TWebImageControl instances added to it, you could set the index of the image via the TWebImageControl.Tag property and then retrieve it this way upon click.