how to hide the read-only and Edit Button

Hello. I work with LO 6.0.5 and same version SDK.

When open document with “ReadOnly” propertyValue, always appear read-only comments and “Edit Button” above main editor window.

I want to hide that but, don’t know how to. When I get “LayoutManager” object and use setVisible( false ) like

xLayoutManager.setVisible( false );

Then all user interface elements hide and doesn’t see. But I want to only hide that “Edit Button” and yellow label.
I want to know that how to hide only that use hideElemet function like

xLayoutManager.hideElement( “private:resource/menubar/menubar” );

or my approch isNot correct?

@unangel: In the future, please do not post as community wiki. See guidelines for asking.