Esempio n. 1
0
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")
Esempio n. 2
0
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)
Esempio n. 3
0
def _showMessage(message):
    myBox = msgbox.MsgBox(XSCRIPTCONTEXT.getComponentContext())
    myBox.addButton("OK")
    myBox.renderFromButtonSize()
    myBox.numberOflines = 2
    myBox.show(message, 0, "Parlatype for LibreOffice")
Esempio n. 4
0
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")
Esempio n. 5
0
def box_1(ctx):
    box = msgbox.MsgBox(ctx)
    box.addButton('OK')
    box.renderFromButtonSize()
    box.numberOflines = 2
    box.show('lixinghe', 0, "Watching")
Esempio n. 6
0
def show_msg(text):
    import msgbox
    myBox = msgbox.MsgBox(XSCRIPTCONTEXT.getComponentContext())
    myBox.addButton('OK')
    myBox.renderFromBoxSize(250)
    myBox.show(text, 0, "TestFailure")