Page History
In the Visual LANSA editor, delete the button on the slider, switch to the Source tab and paste in this code:
...
Define_Com Class(#PRIM_MD.Edit) Name(#TestMessage) Appearance(TextFieldBox) Caption('Caption') DisplayPosition(1) Left(0) Parent(#CustomPanelBody) TabPosition(1) Top(0) Width(865)
...
Placeholder('Type your message here') Height(57)
...
Define_Com Class(#PRIM_MD.RaisedButton) Name(#Button) Caption('Issue Message via Command Handler') DisplayPosition(2) Left(0) Parent(#CustomPanelBody) TabPosition(2)
...
ThemeDrawStyle('MediumAccent') Top(58) Width(865)
Display the Design tab. You now have an edit box on the panel in which you can enter a message. The button next to it will signal the message from the slider to the Framework.
(You can use the Layout tab to position the label and the button.)
Create a Click event routine for the button, and add this SignalEvent statement to it:
...
#Com_Owner.avSignalEvent Withid(ShowMessage) Notifyself(False) Sendainfo1(#TestMessage) To(FRAMEWORK)
Compile the slider.
Next you need to make a component listen to the ShowMessage event being signalled. To do this, open a command handler (if you are using the SCRUD example, the Details command handler XXX_XHOMESALE_SCRUD_Handler).
Paste this event routine into the command handler:
...
Evtroutine Handling(#Com_owner.avEvent) Withid(#EventId) Withainfo1(#AInfo1)
...
If (#EventId = ShowMessage)
...
#AVFRAMEWORKMANAGER.avIssueMessage Text(#AInfo1) Requester(#COM_OWNER) Clearexistingmessages(True)
...
Endif
Endroutine
The routine listens for the ShowMessage event, and when it receives it, it issues the message.
...
