guides:programming:programmers_reference_manual:passing_data_from_the_dialog_box_to_the_window

Passing Data from the Dialog Box to the Window

The dialog box passes the data the user entered (such as the date range) back to the calling window by calling the End_Dialog subroutine in its CLOSE event. Suppose the dialog box contains two edit line controls (START_DATE and END_DATE) which contain the date range. The code below will pass the values back to the calling window:

declare function get_property, set_property, send_event
declare subroutine end_dialog
$insert Ctrl_Property_Equates
ctrls = @window: '.BEGIN_DATE' : @rm : @window : '.END_DATE'
props =     DEFPROP$           : @rm :    DEFPROP$
RtnData = Get_Property(Ctrls, props)
convert @rm to @fm in RtnData
*
*  now return the data
*
End_Dialog( 'COLLECTORWINDOW', RtnData)

The text (the default property of an edit line) is stored in RtnData as a record-mark delimited variable, through the Get_Property() call. After converting the record marks to field marks, RtnData can be passed back to the calling window by calling the End_Dialog subroutine.

  • guides/programming/programmers_reference_manual/passing_data_from_the_dialog_box_to_the_window.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1