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

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



On 23/1/25 4:39 pm, Benoît Minisini wrote:
Le 14/01/2025 à 01:11, BB a écrit :
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.


Normally, if you use the 'Insert()' method, it should be taken into account by then undo/redo stack.

Excellent! Thank you Benoît.

b


References:
Undo/Redo and text controls - setting text in codeBB <adamnt42@xxxxxxxxx>
Re: Undo/Redo and text controls - setting text in codeBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>