From Clomosy Docs

No edit summary
No edit summary
Line 8: Line 8:
'''Example:'''<br>
'''Example:'''<br>
:'''Base Syntax'''
:'''Base Syntax'''
'''begin'''<br>
  var
  // Show a simple message
    word : String;
  ShowMessage('Hello World');<br>
  begin
  // Show a blank message
    word := 'Hello World';
  ShowMessage(<nowiki>''</nowiki>);<br>
    // Show a simple message
  // Split this into two lines
    ShowMessage(word);
  ShowMessage('Hello '+#13#10+'World');<br>
   
'''end;'''
    // Show a blank message
    ShowMessage(<nowiki>''</nowiki>);
   
    // Split this into two lines
    ShowMessage('Hello '+#13#10+'World');
  end;


:'''TRObject Syntax'''
:'''TRObject Syntax'''
  var
    word : String;
   {
   {
  // Show a simple message
    word = 'Hello World';
  ShowMessage('Hello World');
    // Show a simple message
 
    ShowMessage(word);
  // Show a blank message
   
  ShowMessage(<nowiki>''</nowiki>);
    // Show a blank message
 
    ShowMessage(<nowiki>''</nowiki>);
  // Split this into two lines
   
  ShowMessage('Hello '+#13#10+'World');
    // Split this into two lines
    ShowMessage('Hello '+#13#10+'World');
   }
   }



Revision as of 08:33, 2 July 2024

procedure ShowMessage(const Text string);

Applications or the operating system itself use message windows to warn or inform the user. Message windows can be created in clomosy applications using ShowMessage.
In simple terms, it is a message window that can be used to inform the user. It has only one parameter that receives the message to be displayed on the screen. The title of the window is the project name. There is no option to click other than the OK button. The message window is displayed in the middle of the screen.

Insert carriage return and line feed characters (#13#10) into the string to generate multi line message display.

Example:

Base Syntax
 var
   word : String;
 begin
   word := 'Hello World';
   // Show a simple message
   ShowMessage(word);
   
   // Show a blank message
   ShowMessage('');
   
   // Split this into two lines
   ShowMessage('Hello '+#13#10+'World');
 end;
TRObject Syntax
 var
   word : String;
 {
   word = 'Hello World';
   // Show a simple message
   ShowMessage(word);
   
   // Show a blank message
   ShowMessage('');
   
   // Split this into two lines
   ShowMessage('Hello '+#13#10+'World');
 }

Output:

Output1: Hello World
Output2:
Output3: Hello
         World