[Solved] Modeless Dialog?

The Application Programming Interface and the OASIS Open Document Format
Post Reply
Tobin
Posts: 35
Joined: Sun Feb 08, 2009 3:31 am
Location: Houston, Texas USA

[Solved] Modeless Dialog?

Post 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.
Last edited by Hagar Delest on Sun Mar 15, 2009 11:39 pm, edited 1 time in total.
Reason: tagged [Solved].
Tobin Sparks
OOo 3.0, XP
Houston, Texas USA
OOo 3.0.X on Ms Windows XP
User avatar
Villeroy
Volunteer
Posts: 30801
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Modeless Dialog?

Post by Villeroy »

On http://www.oooforum.org/forum/search.phtml you find many modeless dialogs.
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
Tobin
Posts: 35
Joined: Sun Feb 08, 2009 3:31 am
Location: Houston, Texas USA

[Solved] Modeless Dialog?

Post 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
Tobin Sparks
OOo 3.0, XP
Houston, Texas USA
OOo 3.0.X on Ms Windows XP
patel
Posts: 36
Joined: Tue Jun 19, 2012 2:48 pm

Re: Modeless Dialog?

Post by patel »

Villeroy wrote:On http://www.oooforum.org/forum/search.phtml you find many modeless dialogs.
I can not open it
OpenOffice 4.1 on Windows 10
LibreOffice 5.2 on Windows 10
FJCC
Moderator
Posts: 8642
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: [Solved] Modeless Dialog?

Post 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 
Attachments
Non-modal dialog.ods
(20.28 KiB) Downloaded 391 times
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
patel
Posts: 36
Joined: Tue Jun 19, 2012 2:48 pm

Re: [Solved] Modeless Dialog?

Post 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 ?
OpenOffice 4.1 on Windows 10
LibreOffice 5.2 on Windows 10
Post Reply