To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=91177
                 Issue #|91177
                 Summary|Title of the window created by the script is not updat
                        |ed any more
               Component|framework
                 Version|DEV300m20
                Platform|All
                     URL|
              OS/Version|Linux
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|ui
             Assigned to|tm
             Reported by|hanya





------- Additional comments from [EMAIL PROTECTED] Sat Jun 28 17:18:57 +0000 
2008 -------
Title name of the frame initialized with the window created by the Basic and
Python (I tried) is not updated any more. But I can get the changed property
value. Only displayed value on the frame is not updated. I can change titles of
other frames created by the application like a frame of the Basic IDE with the
setTitle method of the com.sun.star.frame.XTitle interface or through Title
property of the frame.

Here is the code to make a new window with the frame. Title name of the frame
can be changed by the code with OpenOffice.org 2.4.1 on WindowsXP and Linux.

Sub Frame_Test
  oDoc = StarDesktop.getCurrentComponent()
  oParent = oDoc.getCurrentController().getFrame().getContainerWindow()
  oToolkit = oParent.getToolkit()
  
  oAttr = com.sun.star.awt.WindowAttribute
  nWindowTypeClass = com.sun.star.awt.WindowClass.TOP
  nAttr = oAttr.MOVEABLE + oAttr.BORDER
  sTypeName = "window"
  
  ' create modaldialog without CLOSEABLE
  oWindow = CreateWindow( oToolkit, oParent, _
      nWindowTypeClass, sTypeName, nAttr, _
      0, 0, 200, 300 )
  oFrame = CreateUnoService("com.sun.star.frame.Frame")
  oFrame.initialize(oWindow)
  
  oFrame.setTitle("NEW TITLE")
  oFrame.setPropertyValue("Title", "NEW TITLE")
  
  oWindow.setVisible(True)
  
  'oFrame.Title = "NEW TITLE"
  msgbox oFrame.getTitle()
End Sub


Function CreateWindow( oToolkit As Object, oParent As Object, _
  nWindowTypeClass As Long, sTypeName As String, nAttr As Long, _
  nX As Long, nY As Long, nWidth As Long, nHeight As Long ) 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 = nWindowTypeClass
    .WindowServiceName = sTypeName
    .ParentIndex = -1
    .Bounds = aRect
    .Parent = oParent
    .WindowAttributes = nAttr
  End With
  CreateWindow = oToolkit.createWindow(aWinDesc)
End Function

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to