Apache OpenOffice (AOO) Bugzilla – Issue 105097
Functions to hide and show dialogs without losing control modifications
Last modified: 2009-10-11 14:18:01 UTC
- createUnoDialog - execute a dialog - fill some combobox or modify some control of this dialog - endexecute the dialog - execute the dialog again - all modifications to the controls of the dialog are lost :( It would be nice to have show and hide methods that keep the modifications to the dialog. Otherwise macro functions to save and load "dialog configurations" are tiedous to code.
Andreas, please have a look.
ab->llyaudet: There already are such methods, but I doubt that it makes much sense to use them with a modal dialog, although it is possible. Assume you have a simple dialog with a button and a text field. If you assign HideHdl to the button's Execute event pressing the button will hide it for 3s keeping the text in the text field: public oDlg Sub Main oDlg = CreateUnoDialog( DialogLibraries.Standard.Dialog1 ) oDlg.execute End Sub Sub HideHdl oDlg.SetVisible( false ) wait( 3000 ) oDlg.SetVisible( true ) End Sub You can also modify the control models before execu- ting the dialog, e.g.: oDlg.Model.TextField1.Text = "Hello" oDlg.execute -> WORKSFORME
worksforme -> closed