I have the function below which allows me to display a message.
Code: Select all
def MessageBox( box_type: int, buttons: int, title: str, message: str) -> int:
ctx = uno.getComponentContext()
smgr = ctx.getServiceManager()
DESK = 'com.sun.star.frame.Desktop'
desktop = smgr.createInstanceWithContext(DESK , ctx)
frame = desktop.getCurrentFrame()
window = frame.getContainerWindow()
toolkit = window.getToolkit()
messagebox = toolkit.createMessageBox(window, box_type, buttons, title, message)
return messagebox.execute()
Is it possible ?
cordially