def box_3(ctx): box = msgbox.MsgBox(ctx) box.addButton('Red') box.addButton('Green') box.addButton('Blue') box.show('What\'s your favourate color?', 0, "Question") print("Answer:", box.Response) box2 = msgbox.MsgBox(ctx) box2.addButton('OK') box2.show(box.Response, 0, "Answer")
def show_message_box(ctx, title, message): """Shows a message box with a single button to acknowledge the information. Source: https://docs.libreoffice.org/scripting/html/msgbox_8py_source.html """ myBox = msgbox.MsgBox(ctx) myBox.addButton('OK') myBox.renderFromBoxSize(150) myBox.numberOflines = 2 myBox.show(message, 0, title)
def _showMessage(message): myBox = msgbox.MsgBox(XSCRIPTCONTEXT.getComponentContext()) myBox.addButton("OK") myBox.renderFromButtonSize() myBox.numberOflines = 2 myBox.show(message, 0, "Parlatype for LibreOffice")
def box_2(ctx): box = msgbox.MsgBox(ctx) box.addButton(r"Let's Go!") box.renderFromButtonSize(300) box.lineHeight = 100 box.show('Ready?', 0, "Message")
def box_1(ctx): box = msgbox.MsgBox(ctx) box.addButton('OK') box.renderFromButtonSize() box.numberOflines = 2 box.show('lixinghe', 0, "Watching")
def show_msg(text): import msgbox myBox = msgbox.MsgBox(XSCRIPTCONTEXT.getComponentContext()) myBox.addButton('OK') myBox.renderFromBoxSize(250) myBox.show(text, 0, "TestFailure")