Code: Select all
Protected StartPos, EndPos
SendMessage_(GadgetID(#MyTextField), #EM_GETSEL, @StartPos, @EndPos)
SetGadgetText(#StrDateTime, GetDateTime())
SendMessage_(GadgetID(#MyTextField), #EM_SETSEL, StartPos, EndPos)
Thanks.
Code: Select all
Protected StartPos, EndPos
SendMessage_(GadgetID(#MyTextField), #EM_GETSEL, @StartPos, @EndPos)
SetGadgetText(#StrDateTime, GetDateTime())
SendMessage_(GadgetID(#MyTextField), #EM_SETSEL, StartPos, EndPos)
I'll get a working example done later today hopefully, if life doesn't life.jacdelad wrote: Wed Aug 07, 2024 3:03 pm Hi Quin,
two question:
1. Before everyone posts a "works here", can you post a working example, which shows the described behaviour on your side, please?
2. Out of curiosity: Why do you need to do this (if I may ask)?
Nope, that was a find/replace error. #StrDateTime was a constant in my application that I intended to replace everywhere with #MyTextField, guess I missed a spotebs wrote: Wed Aug 07, 2024 3:27 pm My first question/comment is that it appears you are working with two different string gadgets: #MyTextField and #StrDateTime. Is this what you intended?