How can a dialog close event be captured or the close button removed from the top of the dialog frame? The ultimate goal is to have an open document to close when the dialog does to prevent access to document by the user.
Thanks...
[Solved] Trap dialog close event or remove close button
[Solved] Trap dialog close event or remove close button
Last edited by grnhorn on Mon Jul 21, 2008 11:54 pm, edited 1 time in total.
OOo 2.4.X on Ms Windows XP
Re: Trap dialog close event or remove close button
Method execute() returns 0 if the dialog has been canceled. I just posted an example with FilePickers: http://user.services.openoffice.org/en/ ... 713#p37713
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Trap dialog close event or remove close button
Thanks Villeroy, but I guess I have left you hanging on what I am looking for. I want to trap the exit code for a dialog created in BASIC so that it will close the document. Or I want to remove the system close button so that I can add my own to close the doc to prevent the user from having access to the system commands.
Thanks...
Thanks...
OOo 2.4.X on Ms Windows XP
Re: Trap dialog close event or remove close button
You can not remove the close button from the window title. This is under the control of the respective window system.
This scheme always woks for me:
Don't accept Cancel or window's [X]-button:
If you need anything more sophisticated, go ahead, install the Xray Tool and set up all the listeners you need.
This scheme always woks for me:
Code: Select all
iResult = myDialog.execute()
If iResult = 1 then
do_Stuff(args)
Else
do_SomemethingElse()
End If
Code: Select all
do while iResult = 0
iResult = myDialog.execute()
If iResult = 1 then do_Stuff(args)
Loop
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice