Populate DeviceSearch Screen

We have created a DeviceSearch screen, but we have not linked any action handlers and data references to it. Open your screen "DeviceSearch" in the ProLinga Screen Editor and start the Painter.

The Screen itself must be linked to "L-DeviceSearchRealize" for the "realize" signal. This signal is triggered as soon as the screen is created at run-time. To link signals to the screen itself either select the entry "DeviceSearch" in the Widget Window (first entry) or click on the "DeviceSearch" of the main frame of the Painter and then go to the "signal" tab of the Properties Window.

The "Cancel" button must be linked to "C-cancel" for the "clicked" signal.

The "OK" button must be linked to "L-DeviceSearchOK" for the "clicked" signal. The button should also be set as the 'default' button, meaning that logic linked to the button will be executed when the 'ENTER' button is pressed on the Text Entry field. Go to the 'Common' tab and set the toggle buttons 'Has Focus' and 'Can Focus' to 'Yes'.

The "Index" button must be linked to "L-DeviceSearchList" for the "clicked" signal.

The "Text Entry" field must be linked to Data Reference D:GET:G-deviceNumber.Search for the focus_in_event and D:PUT:G-deviceNumber.Search for the focus_out_event. With G- we can get a value from a Variable Group entry. It is also important that you give this object the name "entryFilter" so we can reference it from logic later on. Set the 'Activates Default' toggle button to 'Yes'. In the 'Common' tab set the toggle buttons 'Can Focus' and 'Has Focus' to 'Yes', so this field will get the input focus when displayed.

It is important that we set the name of the "List Store", since we need to reference it later on from logic. Set the name to "DeviceSearchList".

Figure 107. Name The List View

Screenshot of the name of the List View.

Then we need to link a couple of signals to the "List View". Set a "cursor_changed" signal and link that to logic "PartSearchSelect". This logic is performed every time the user selects a line in the list view. Set a "button_press_event" signal and link that to "L-DeviceSearchOK". This logic will be triggered on a double mouse click. Set a "realize" signal and and link that to " I:"Device" ", the name of our List Store.

Figure 108. Signals List View

Screenshot of the signals of the List View.

This is all that needs to be done in the Painter for the "DeviceSearch" screen. Save the screen and continue with the next chapter where we will write all the matching logics.