We have been trying to figure out how to use the Dialog_Change OnEvent>. Help for OnEvent> states:
Sounds like exactly what we want. But we can't figure out how t make it work. We've tried both modal and non-modal dialogs and tried placing aDIALOG_CHANGE
EventParm is the dialog name. ExtraParm is the object name. When the value of the object is changed by the user the subroutine is triggered. Valid object types include Edit, Memo, ComboBox, ListBox, RadioGroup and CheckBox
GetDialogProperty> in the non-modal loop thinking that perhaps that was needed to set the edit box value for the onEvent to trigger. No luck.
Following is a sample of what we've been trying to do. It seem to me that the "FixIt" subroutine should be triggered as soon as any character is typed into the edit field. I do not get the subroutine to run no matter what I try.
Any ideas?
Code: Select all
OnEvent>Key_Down,VK27,0,Quit
OnEvent>DIALOG_CHANGE,dialog1,Edit1,FixIt
SRT>FixIt
MDL>Ok
GetDialogProperty>dialog1,Edit1,Test,txtseq1
StringReplace>txtseq1,$,,txtseq1
StringReplace>txtseq1,%,,txtseq1
SetDialogProperty>dialog1,Edit1,Test,txtseq1
END>FixIt
Dialog>Dialog1
object Dialog1: TForm
Left = 501
Top = 219
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 223
ClientWidth = 439
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object Edit1: TEdit
Left = 90
Top = 55
Width = 247
Height = 21
TabOrder = 0
Text = ''
end
end
EndDialog>Dialog1
AddDialogHandler>dialog1,,onclose,Quit
Show>dialog1
//Show>dialog1,res1
Label>Loop
Wait>0.01
//GetDialogProperty>dialog1,Edit1,Test,txtseq1
Goto>Loop
SRT>Quit
Exit>
END>Quit