Recent

Author Topic: [Solved] TImage Click event not firing  (Read 984 times)

nikel

  • Sr. Member
  • ****
  • Posts: 267
[Solved] TImage Click event not firing
« on: November 21, 2023, 07:07:40 pm »
Hello, I'm trying make a Select directory button but click event is not firing. I also tried MouseDown event. Here's my code:

Code: Pascal  [Select][+][-]
  1. procedure TForm1.ExportDialog_ImgClick(Sender: TObject);
  2. var
  3.   ChosenDirectory    : string;
  4.  
  5.   Config             : PConfig;
  6. begin
  7.   ...
  8. end;

How can I create custom button for directory selection?
« Last Edit: November 22, 2023, 03:26:42 pm by nikel »

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: TImage Click event not firing
« Reply #1 on: November 21, 2023, 09:23:53 pm »
All we see is an empty method, to find out why it is not working we should have a sample project.
Without knowing if you have registered method correct etc....
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

nikel

  • Sr. Member
  • ****
  • Posts: 267
Re: TImage Click event not firing
« Reply #2 on: November 22, 2023, 12:50:46 pm »
Thank you for your reply. I attached my project.

dseligo

  • Hero Member
  • *****
  • Posts: 1653
Re: TImage Click event not firing
« Reply #3 on: November 22, 2023, 02:16:28 pm »
Problem is that ExportDialog_Img (other images also) is not in group box Export_Gbx, Form1 is their parent.
Cut ExportDialog_Img, click on group box, and then paste it. After that it will work.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: TImage Click event not firing
« Reply #4 on: November 22, 2023, 02:35:01 pm »
Problem is that ExportDialog_Img (other images also) is not in group box Export_Gbx, Form1 is their parent.
Cut ExportDialog_Img, click on group box, and then paste it. After that it will work.
You was faster, I just fixed top image :D
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

nikel

  • Sr. Member
  • ****
  • Posts: 267
Solved: TImage Click event not firing
« Reply #5 on: November 22, 2023, 03:26:19 pm »
Thanks for the helps. It worked fine after I changed parent.

 

TinyPortal © 2005-2018