How to show a draw shape with a macro

Greetings, dear LO users!

I cannot figure out (or find an example) how to perform the following simple task in the LibreOffice Calc 6.2. Or maybe this task only looks simple and in reality is not possible at all?

I have a drawing shape (e.g. a simple rectangle) in a sheet (call it ShapeA) and a textbox shape in another sheet (call it TextboxB). I want to do the following: when I click on the ShapeA, the TextboxB must somehow appear (pop up) on the screen (without changing the current sheet, maybe in a dialog box?) and then be closed with a mouse click.

I understand that with the function MessageBox one can show text on the screen. But I need to display a preformatted TextBox.

I guess the macro associated with ShapeA could look something like this:

Sub Main
oDrawPage = ThisComponent.getDrawPage()
oTb = oDrawPage.getByName("TextBoxB")
oTb.show()
End Sub

Could someone please advise what I should put into this macro to accomplish the described task?

UPDATE: Additional info on what I want to accomplish with this macro.

I have a very cluttered diagram with many shapes. Each shape has some textual information associated with it. There is not enough space on each shape or around it to contain this info. So there is must be a way to display this info about each shape. Also this information should be displayed in a preformatted way (it contains code and other structured info).

My plan is to create a textbox with the relevant information for each diagram shape, place these textboxes in other sheet and have a possibility, when viewing diagram, to click on any shape and view the associated info in the poped up textbox without leaving the diagram, and then close the textbox with a simple action (e.g. by clicking on it).

Does this task sound feasible to be realized with LO’s shapes and macros?

Answered at LibreOffice macro showing simple TextBox shape - Stack Overflow.