How to change width and remove close button of TPopupNotifier component? lazarus / 31-LCL ---------------------------------------------------------------------- krzynio · 2014-09-29 16:40 ? ---------------------------------------------------------------------- howardpc · 2014-09-29 17:49 Short answer: I don't think you can. TPopupNotifier is designed to display its Icon, Title and Text in a routine, stereotypical way, and has not been designed for flexibility. Every time it is shown a method called HandleResize is called which controls the layout behind the scenes, and there is no programmatic access to the Close button, except by an ugly hack. If you want more flexibility, I think you would do best to write your own component  from scratch (perhaps based on ideas in TPopupNotifier), because TPopupNotifier was not designed to be easily customised. The forms unit has a THintWindow class which makes a good base class for such popups. ---------------------------------------------------------------------- krzynio · 2014-09-29 18:16 Thank you very much for quick answer. If I didn't find a simple solution like hidden_width := 400 until tomorrow then I will write my own solution based on TForm. ---------------------------------------------------------------------- howardpc · 2014-09-30 04:38 The following shows the extent of customisation possible - it is not pretty. I'm sure you're better off writing your own solution. It is impossible to remove the close 'button' (without hacking the component to death) since it is not a 'real' TButton or TSpeedButton, but a simulated button square painted on the surface of the form. Code: [Select]unit mainTestNotifier; {$mode objfpc}{$H+} interface uses   Forms, PopupNotifier, StdCtrls, sysutils; type   { TForm1 }   TForm1 = class(TForm)     Button1: TButton;     PopupNotifier1: TPopupNotifier;     procedure Button1Click(Sender: TObject);     procedure FormCreate(Sender: TObject);   private     procedure PopupOnShow(Sender: TObject);   end; var   Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject); begin   PopupNotifier1.Icon.Assign(Application.Icon);   PopupNotifier1.Title:='PopupNotifier1 Title';   PopupNotifier1.ShowAtPos(Screen.Width div 2, Screen.Height div 2); end; procedure TForm1.FormCreate(Sender: TObject); begin   PopupNotifier1.vNotifierForm.OnShow:=@PopupOnShow; end; procedure TForm1.PopupOnShow(Sender: TObject); begin   PopupNotifier1.vNotifierForm.Width:=600; // i.e. some custom value   PopupNotifier1.Text:=Format('Width is now %d, (but note that custom painted Close ''button'' has'+                               ' not moved to accommodate the new width)',                               [PopupNotifier1.vNotifierForm.Width]); end; end.