Form S_206F03 Message Window Form

LANSA

Form S_206F03 Message Window Form
* ===================================================================
*
* Component : S_206F03
* Type : Form
* Ancestor : PRIM_FORM
*
* Description : Message Window Form
*
* Disclaimer : The following material is supplied as sample material
* only. No warranty concerning this material or its use
* in any way whatsoever is expressed or implied.
*
* ===================================================================
* This form is designed to allow the user to send a message to an individual user
*

Function Options(*DIRECT)
Begin_Com Height(97) Left(355) Top(305) Width(356)
Define_Com Class(#PRIM_EDIT) Name(#EDIT_1) Displayposition(1) Left(7) Maxlength(213) Parent(#COM_OWNER) Tabposition(1) Top(6) Width(337)
Define_Com Class(#PRIM_PHBN) Name(#PHBN_1) Caption('Send Message') Displayposition(2) Left(104) Parent(#COM_OWNER) Tabposition(2) Top(40) Width(121)

Define Field(#CAPTION) Type(*CHAR) Length(50)

* When the message is sent, this event returns the target user name and the message to the main form
Define_Evt Name(UserMessage)
Define_Map For(*input) Class(#S_206MESS) Name(#Message)
Define_Map For(*input) Class(#S_206FRM) Name(#Alias)

Mthroutine Name(WriteMessage)
Define_Map For(*input) Class(#S_206FRM) Name(#Alias)
* This method routine sets the form caption and then shows the form
Change Field(#S_206FRM) To('#Alias.value')
Use Builtin(BCONCAT) With_Args('Individual Message to User:' #S_206FRM) To_Get(#CAPTION)
Set Com(#COM_OWNER) Caption(#CAPTION)
Invoke Method(#COM_OWNER.ShowForm)
Endroutine

Evtroutine Handling(#PHBN_1.Click)
* When the button is clicked the form signals that a message is to be sent.
Change Field(#S_206MESS) To('#EDIT_1.VALUE')
Signal Event(UserMessage) Message(#S_206MESS) Alias(#S_206FRM)
Invoke Method(#COM_OWNER.CloseForm)
Endroutine
End_Com