[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undo/Redo and text controls - setting text in code


On 1/13/25 7:11 PM, BB wrote:
Hi all 'n happy 25


Is there a way to set the text of a textbox or textarea in the project code and get that change appended into the undo/redo chain?


I have some shortcuts via control_KeyPress that insert text into the control's text but that doesn't get it into that chain. For example, I want to use ALT+D to insert a "diary tag" (the date and the user) at the front of the text.


tia

bruce



Just FYI, I thought perhaps using Desktop.SendKeys instead of inserting the text directly. But, that apparently also triggers control.KeyPress and causes a recursive loop.


--
Lee

--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ----
--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----


References:
Undo/Redo and text controls - setting text in codeBB <adamnt42@xxxxxxxxx>