Hi all ,
Iam trying to run a dialog with an edit box that gets updated via button pressed on the dialog screen.
Example , I have an edit box called Time Done, when I press a button on the screen called GET FILES I wish it to update the Time Done edit box with the current time.
My issue is that whatever is in the edit box when the dialog opens , stays there and can not be updated -on the fly-
Is there a command to refresh the dialog window to refresh the variables that feed the edit box?
Updating edit box in a dialog
Moderators: JRL, Dorian (MJT support)
This sample demonstrates how to change several dialog objects. It will change a label, an edit box, a button, a combobox and a listbox. There are two things to know, one is the name of the item to be changed which I usually acquire by creating the dialog then adding a Show> line to the script. I then step through those few lines in the editor by pressing F8. After that if you look at the info in the watchlist you'll see the names of the variables to change. The second thing is that most of these won't change until after you run ResetDialogAction>.
Code: Select all
Dialog>Dialog1
Caption=Dialog1
Width=369
Height=197
Top=368
Left=432
Label=msLabel1,32,24
Edit=msEdit1,32,48,121,
Button=Display,32,80,75,25,0
ComboBox=msComboBox1,208,24,121,
ListBox=msListBox1,208,56,121,49,
Button=Process,152,128,75,25,3
Default=Process
EndDialog>Dialog1
Show>dialog1
Label>start
GetDialogAction>dialog1,r1
If>r1=3,Process
If>r1=2,EOF
Goto>start
Label>EOF
SRT>Process
GetTime>time
Let>dialog1.mslabel0=%time%
Let>dialog1.msedit1=%time%
Let>dialog1.msbutton2=%time%
Let>dialog1.mscombobox1.items.text=%time%
Let>dialog1.mslistbox1.items.text=%time%
ResetDialogAction>dialog1
END>Process