# What are Dialogs in Macro Organiser? [closed]

LO 4.4.1.2 on Windows 8.
In the Macro Organiser there are 3 Tabs - Modules, Dialogs, and Libraries. I know what Modules and Libraries are but wondering about Dialogs.
What are Dialogs and how are they created and used.

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2020-08-14 11:13:11.390708

Sort by » oldest newest most voted

Dialogs are used to generate a user interface by means of Basic. A library consists of scripts and dialogs. Scripts are grouped in modules. You can examine these, when you have a look at the library "Gimmicks" in LibreOffice Makros. The tab "Modules" actually lists the scripts and the tab "Dialogs" lists the dialogs. But when you open either of them with click on "Edit", it opens the whole Library not only scripts or dialogs.

To see such dialog in action, simple run "StartChangeUserfields" in module Userfields in library "Gimmicks". Then compare what you get there with the tab "UserfieldDlg" in the Basic IDE.

The scripts and the dialogs are stored in different files, but you cannot use one without the other. Therefore it makes no difference whether you select dialog.xlb or script.xlb when importing a library.

For more details on Basic dialogs you might look at the section "Guides" in the help, or at chapter 11 "Dialogs" in "StarOffice 8 Programming Guide for BASIC", or https://wiki.openoffice.org/wiki/Docu... . or http://api.libreoffice.org/examples/D...

more

Thanks @Regina. The IDE looks very like creating Forms in MS Visual Studio, It seems odd to have this in LO as there is no equivalent in MS Office.

( 2015-08-03 16:47:01 +0100 )edit

If you're like me you have only written macros till now. I was so used to opening Menu> Tools Macros Organize Macros LibreOffice Basic... that I didn't even notice the menu choice right below it for Organize Dialogs... where you can create and edit dialogs.

When you open it up you get among other things the list of the largely undocumented LibreOffice Dialogs which is all read-only for some reason although it appears you can edit a dialog's properties. This is also where you can open My Dialogs and Dialogs for your other opened documents.

Be sure Menu> View Toolbars Toolbox is checked which gives you a menu of drag and drop tools.

Select something on the Dialog. Small green corners will appear. Also properties will appear with General and Events tabs.

The Events tab is where you link the Dialog to macros to create behavior. It seems you can't drag to move, but you can set the xy coordinates to adjust the Dialog. Also there is a preview button to preview your dialog. (Use Escape to close it again.)

When Regina writes in another answer here, "To see such dialog in action, simple run "StartChangeUserfields" in module Userfields in library "Gimmicks", the way you do this is to go to Menu> Tools Macros Run Macro Then drill down in LibreOffice Macros Gimmicks click Userfields and then StartChangeUserfields and hit the Run button.

Which gives you this Dialog which you can use to edit your use data.

Verify that this works by entering something like in Company name, and clicking Select below. Then to go a main LO window, and see Menu> Tools Options LibreOffice User Data.

more