Recent

Author Topic: Event missing  (Read 229 times)

P.curtis

  • Jr. Member
  • **
  • Posts: 80
Event missing
« on: April 06, 2020, 04:42:56 pm »
When I drop a BGRAThemebutton on a form it doesn't have any event, like OnClick, ..., in the object inspector. Am I missing something ?

sstvmaster

  • Full Member
  • ***
  • Posts: 161
Re: Event missing
« Reply #1 on: April 06, 2020, 07:08:24 pm »
The On... events exists, but only for manual use:
Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, BGRAThemeButton,
  9.   BGRATheme, BGRAColorTheme, BGRAImageTheme;
  10.  
  11. type
  12.  
  13.   { TForm1 }
  14.  
  15.   TForm1 = class(TForm)
  16.     BGRAColorTheme1: TBGRAColorTheme;
  17.     BGRAImageTheme1: TBGRAImageTheme;
  18.     BGRATheme1: TBGRATheme;
  19.     BGRAThemeButton1: TBGRAThemeButton;
  20.     procedure FormCreate(Sender: TObject);
  21.   private
  22.  
  23.   public
  24.     procedure ThemeButtonClick(Sender: TObject);
  25.   end;
  26.  
  27. var
  28.   Form1: TForm1;
  29.  
  30. implementation
  31.  
  32. {$R *.lfm}
  33.  
  34. { TForm1 }
  35.  
  36. procedure TForm1.FormCreate(Sender: TObject);
  37. begin
  38.   BGRAThemeButton1.OnClick:=@ThemeButtonClick;
  39. end;
  40.  
  41. procedure TForm1.ThemeButtonClick(Sender: TObject);
  42. begin
  43.   ShowMessage('ThemeButton clicked');
  44. end;
  45.  
  46. end.  
  47.  

I don't know if this events were forgotten in OI or it was intention.

I think circular is the maintainer.
« Last Edit: April 06, 2020, 07:11:01 pm by sstvmaster »
Windows 10 (64 bit)
Lazarus: 2.0.8 / Trunk x32

P.curtis

  • Jr. Member
  • **
  • Posts: 80
Re: Event missing
« Reply #2 on: April 06, 2020, 07:51:42 pm »
OK, Thanks for the repy. I can't believe that it's intentional.

 

TinyPortal © 2005-2018