I want to write to the text area of a window without showing it/making it active
ie
in window1 I have the code
window2.mymethodtoaddtext(“hello”)
If I use this from window 1 then window 2 gets focus.
Is there anyway to alter the text on a second window without activating it and giving it focus?
Thanks
Hamish
Unfortunately, updating a TextArea on a window that isn’t yet visible, will indeed instantiate it and make it visible (and therefore its window). Referencing any item associated with Window2 will do this.
There’s a couple of ways you could tackle this problem but here’s an idea to get you started: use a Boolean flag which you check in TextArea.Open - the flag is set when you’re updating the text using your method. If the flag is True, you can then ensure the Window doesn’t change its Visible status (see Edgard’s link above)