OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Python and Basic Dialogs

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
SuneOskar
General User
General User


Joined: 24 Aug 2010
Posts: 8

PostPosted: Tue May 01, 2012 10:18 am    Post subject: Python and Basic Dialogs Reply with quote

The code below is copied from this forum and and works fine to open myDialog.

Code:
import uno
#, unohelper
def mydialog():
    psm = uno.getComponentContext().ServiceManager
    dp = psm.createInstance("com.sun.star.awt.DialogProvider")
    dlg = dp.createDialog("vnd.sun.star.script:Standard.myDialog?location=application")

    dlg.execute()


However, I want to close it using a macro and not by means of a button or the mouse, but cannot figure out how to do it
Back to top
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Tue May 01, 2012 11:36 am    Post subject: Reply with quote

Hello

I think you can use: endDialog

http://www.openoffice.org/api/docs/common/ref/com/sun/star/awt/XDialog2.html

Romke
_________________
OOo 3.4.5 on openSUSE 12.1
Use this forum : http://user.services.openoffice.org/en/forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group