Page 1 of 1

[Solved] Modeless Dialog?

Posted: Tue Feb 10, 2009 4:51 am
by Tobin
Howdy,

I've done a little research on this but I just want to confirm my findings are current.
Is it true - there is no practical way, in OOo Basic, to create a Modeless Dialog for the user.
I really need to let the user select buttons on the Form after the Dialog appears.

Any suggestions or confirmations would be appreciated.

Re: Modeless Dialog?

Posted: Tue Feb 10, 2009 3:56 pm
by Villeroy
On http://www.oooforum.org/forum/search.phtml you find many modeless dialogs.

[Solved] Modeless Dialog?

Posted: Wed Feb 11, 2009 4:32 am
by Tobin
Howdy,

Thanks Villeroy for your reply. I was sure I wasn't the only one looking for this :D .
Thanks for the pointer. I'll have to check those out later. Gota say though it seems strange it's not built in.

Thanks Again

Re: Modeless Dialog?

Posted: Thu Aug 18, 2016 11:53 am
by patel
Villeroy wrote:On http://www.oooforum.org/forum/search.phtml you find many modeless dialogs.
I can not open it

Re: [Solved] Modeless Dialog?

Posted: Thu Aug 18, 2016 2:45 pm
by FJCC
The other forum is no longer available. Here is a simple example. You can change the value of the variable M between True and False to see how the dialog behaves differently.

Code: Select all

DialogLibraries.LoadLibrary( "Standard" )  'Load the standard Library
dlg = CreateUnoDialog( DialogLibraries.Standard.Dialog1 )  'Load the existing Practice Dialog
odlgModel = dlg.Model

Doc = ThisComponent
Sheet = Doc.Sheets(0)
Cell = Sheet.getCellByPosition(0,0)

M = False  'Set False for non_modal
If M Then 
	dlg.execute()
Else
	dlg.visible = true
	do
		n = dlg.model.CloseButton.State
		Controls() = odlgModel.getControlModels
		TextFieldModel = Controls(1)
		TextFieldModel.Text = Doc.CurrentSelection.AbsoluteName
		if n = 1 then exit do
		wait (100)
	loop
End If 

Re: [Solved] Modeless Dialog?

Posted: Thu Aug 18, 2016 3:47 pm
by patel
Ok, very good, thank you, but how can I use a Command Button instead of OptionButton for closing ?

how can I Use all the other dialog controls in the nomodal mode ?