Need comfirmation about no function of Modeless Dialogs in 4.0

Fernand Vanrie sos at pmgroup.be
Mon Jan 28 06:39:37 PST 2013


We uses the Basic codelines below to make Modeless Dialogs, sinds 4.0 we 
endup with a non-visible window
is this Windows only or a more general regression ?,
it was working until 3.6.4  windows?

Greetz

Fernand

Sub Main
   oDoc = ThisComponent
   oParentFrame = oDoc.CurrentController.Frame
   oPeer = oParentFrame.ContainerWindow
   oToolkit = oPeer.Toolkit

   oWindow = CreateNewWindow(oToolkit,oPeer,150,150,200,200)
   oFrame = CreateUnoService("com.sun.star.frame.Frame")
   oFrame.initialize(oWindow)
   oFrame.setCreator(oParentFrame)
   oFrame.setName("NewFrame")
   oFrame.Title = "New Frame"

   oParentFrame.getFrames().append(oFrame)

   oWindow.setVisible(True)
End Sub


Function CreateNewWindow( _
   oToolkit,oParent,nX,nY,nWidth,nHeight) As Object
   aRect = CreateUnoStruct("com.sun.star.awt.Rectangle")
   With aRect
     .X = nX
     .Y = nY
     .Width = nWidth
     .Height = nHeight
   End With
   aWinDesc = CreateUnoStruct("com.sun.star.awt.WindowDescriptor")
   With aWinDesc
     .Type = com.sun.star.awt.WindowClass.TOP
     .WindowServiceName = "dialog"
     .ParentIndex = -1
     .Bounds = aRect
     .Parent = oParent
     .WindowAttributes = _
       com.sun.star.awt.WindowAttribute.MOVEABLE + _
       com.sun.star.awt.WindowAttribute.CLOSEABLE
   End With
   CreateNewWindow = oToolkit.createWindow(aWinDesc)
End Function

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130128/91d7a73a/attachment.html>


More information about the LibreOffice mailing list