I need to assign the name of the form control that has focus (in this instance one of several text boxes) to a variable in a LO basic macro. Is anyohe aware of a function that accomplishes this? I’ve been looking for a few hours with no luck.
More specifically, the macro is being designed to be triggered by an image button elsewhere on the form upon a mouse click. I’m attempting to design the macro so it will insert a text string into the textbox that has focus at the time the image button is clicked. The target textbox will have focus due to the user having just added text via the keyboard with the cursor still residing in the textbox at the time the image button is clicked. If there is a function that will return the name of the form control that has focus at the time the function is called (something like “getByFocus()”) it would make my life a lot easier. So far, my searching has not turned up such an animal. The closest thing I’ve found thus far is “getCurrentController()”
Thanks in advance.