Topic: script a click event on a cell

script a click event on a cell

Domebil

Re: script a click event on a cell

What exactly do you mean?

Dmitry.

Re: script a click event on a cell

click on a specific cell and open an image

Domebil

Re: script a click event on a cell

Hello Domebil, Hello Dmitri

Can this help you ?

Display an image by cliking on a cell or pressing a key (Up or Down)

En naviguant avec la touche UP (même chose avec la touche DOWN (OnKeyDown) :

procedure Form1_GridEmployees_OnKeyUp (Sender: string; var Key: Word; Shift, Alt, Ctrl: boolean);
begin
     Form1.DBImage1.Clear;
     Form1.DBImage1.LoadFromDatabase('employees', 'photo', Form1.GridEmployees.dbItemID);
end;

En cliquant sur une cellule de la ligne de la grille :

procedure Form1_GridEmployees_OnCellClick (Sender: string; ACol, ARow: Integer);
begin
     Form1.DBImage1.Clear;
     Form1.DBImage1.LoadFromDatabase('employees', 'photo', Form1.GridEmployees.dbItemID);
end;

JB

Re: script a click event on a cell

clicking on a specific cell (example cell 0) opens the image

Post's attachments

Attachment icon click.jpg 20.05 kb, 140 downloads since 2020-04-21 

Domebil

Re: script a click event on a cell

Hello

What is your script behind OnClick event upon your image ?
JB

Re: script a click event on a cell

clicking on a specific cell in a TableGrid1 shows me the image inherent in the cell

Post's attachments

Attachment icon click-cell.jpg 34.37 kb, 136 downloads since 2020-04-22 

Domebil