Opening a Dialog With Basic

V okne LibreOffice Basic vytvoren√©ho dial√≥gu opustite Editor dial√≥gu kliknut√≠m na z√°loŇĺku s n√°zvom modulu, ku ktor√©mu je dial√≥g pridelen√Ĺ. Z√°loŇĺka s n√°zvom modulu je na spodnej strane okna.

Vytvorte nasleduj√ļci k√≥d pre podprogram naz√Ĺvan√Ĺ Dialog1Show.V tomto pr√≠klade meno vytvoren√©ho dial√≥gu je "Dialog1":


Sub Dialog1Show
    With GlobalScope.BasicLibraries
       If Not .IsLibraryLoaded("Tools") Then .LoadLibrary("Tools")
    End With
    oDialog1 = Tools.ModuleControls.LoadDialog("Standard", "Dialog1")
    oDialog1.Execute()
End Sub

Bez pouŇĺitia "LoadDialog" m√īŇĺete vyvolaŇ• k√≥d nasledovn√Ĺm sp√īsobom:


Sub Dialog1Show
    DialogLibraries.LoadLibrary("Standard")
    oDialog1 = CreateUnoDialog( DialogLibraries.Standard.Dialog1 )
    oDialog1.Execute()
End Sub

KeńŹ spust√≠te tento k√≥d otvor√≠ sa, "Dialog1". Pre zatvorenie dial√≥gu kliknite na tlańćidlo zatvoriŇ• (x) na vrchnom paneli dial√≥gu.

Please support us!