Macro instruction to move cursor into a textbox?

asked 2019-11-18 16:19:52 +0100

Alectrona gravatar image

trying this, but it doesnt work.

myTextBox = thisComponent.DrawPage.getByIndex(0) thisComponent.getCurrentController.getViewCursor.gotoRange(myTextBox, false)

edit retag flag offensive close merge delete


Calc?, Writer?, Draw?, Impress?... version of LibreOffce?... you want write into TextBox?, you not need move the cursor.

doc = ThisComponent
dp = doc.DrawPages.getByIndex(0)
txt = dp.getByIndex(0)
txt.setString("Test ASK")
mauricio gravatar imagemauricio ( 2019-11-18 17:17:46 +0100 )edit

Writer, version 6.2.8. I want to move the cursor to the TextBox in order to type quickly while taking notes in class

Alectrona gravatar imageAlectrona ( 2019-11-19 01:30:02 +0100 )edit

My code works when using Frames instead of Textboxes somehow.

Alectrona gravatar imageAlectrona ( 2019-11-19 02:21:56 +0100 )edit