Forum Discussion
tristaanogre
14 years agoEsteemed Contributor
Why not just assign the text property of the component? Shouldn't you be able to do something like
As for the events, yes, that's kind of what I'm talking about. In my previous life, I had to automate a delphi application where I needed to make sure that, after using SetText, I called an event handler to update other fields on the same screen that are normally updated upon existing the edit field. So, what I had to do was call the event handler after setting the text field for the exit. It looked something like
So, depending upon the component, you can simulate the effects of actual keystrokes by calling the event handlers.
MyField.Text = "11/09/2011"
As for the events, yes, that's kind of what I'm talking about. In my previous life, I had to automate a delphi application where I needed to make sure that, after using SetText, I called an event handler to update other fields on the same screen that are normally updated upon existing the edit field. So, what I had to do was call the event handler after setting the text field for the exit. It looked something like
MyField.Text := "2";
MyField.DoExit;
So, depending upon the component, you can simulate the effects of actual keystrokes by calling the event handlers.