Page 1 of 1

Selecting, Copy text from textbox on a HSQLDB based form

Posted: Fri Jun 06, 2025 1:00 am
by dreamquartz
Hi All,

Question: "Where can I find info creating a Macro about what and how to select a text in a text box with a button, so it can be pasted in a program outside of LO?
I handle many forms, but the question came up on selecting and copying the full Address, as shown in a Text Box, to the Calendar used in Thunderbird?
The Client stores all the Client info in a DataBase, but at this point in time there is not really a budget for further development.

Any suggestions on how to put it in a Macro are also appreciated.

Thanks in advance,

Dream

Re: Selecting, Copy text from textbox on a HSQLDB based form

Posted: Sat Jun 07, 2025 10:30 am
by Villeroy
Focus in text box
Ctrl+A
Ctrl+C

Re: Selecting, Copy text from textbox on a HSQLDB based form

Posted: Sat Jun 07, 2025 7:24 pm
by dreamquartz
Thanks....
One way or the other that does not seem to work, trying to record a Macro. I can record a Macro in Writer, but doing the same with a Text Box, that does not work. It appears that a Text Box in a for. Is not the same as textvin Writer. Where can I find info about objects that handle Text boxes was my initial thought so that I can learn about using that in other situations as well


Dream

Re: Selecting, Copy text from textbox on a HSQLDB based form

Posted: Mon Jun 09, 2025 12:40 pm
by JeJe
The macro doesn't record when the focus is in a forms control textbox in Writer but you can record the same key presses when the focus is in the main document and they will work when instead the focus is in the textbox.


Edit:

Or, in a Writer document with one forms control textbox:

Code: Select all

msgbox thiscomponent.drawpage.getbyindex(0).control.string

Re: Selecting, Copy text from textbox on a HSQLDB based form

Posted: Thu Jun 12, 2025 2:22 pm
by Bidouille
dreamquartz wrote: Sat Jun 07, 2025 7:24 pm Where can I find info about objects
Xray or MRI is your friend :)