Forum > Linux

Similar function in Lazarus as ShowMessage, but with delay not "OK" button.

<< < (2/9) > >>

eny:
Just create a tiny wrapper function for it.
You can make it as simple or complicated as you want.
E.g.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure MyShowMessage(Const Fmt : String; const Args : Array of const);begin  ShowMessage(format(Fmt,Args))end; //... MyShowMessage('What''s up number %d', [1000]);

typo:
No, he needs something like this:


--- Code: ---procedure ShowTheMessage(ATitle, AMessage :string; ADelay :integer);
begin
  with formMessage do
  begin
    Caption := ATitle;
    Position := poScreenCenter;
    FormStyle := fsSystemStayOnTop;
    Show;
    Application.ProcessMessages;
    Label1.Caption := AMessage;
    Application.ProcessMessages;
    Sleep(ADelay);
    Close;
  end;
end; 

--- End code ---

jinx:
So with that simple procedure it will actually work?!

Also is there a possibility of using the notification from KDE? Send messages to KDE notification?

typo:
You need to create formMessage with a Label with WordWrap set to True.

jinx:
How to create a formMessage?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version