[Libreoffice-bugs] [Bug 87884] tabpages not displayed in Java/Python/basic dialog

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Jan 24 14:10:01 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=87884

--- Comment #14 from Volker Lenhardt <volker.lenhardt at uni-due.de> ---
Some remarks to the workaround.

You can create a page model from the tabs container model as well as from the
dialog model:

pageModel1 = dialogModel.CreateInstance("com.sun.star.awt.UnoPageModel")

instead of

pageModel1 = tabsModel.CreateInstance("com.sun.star.awt.UnoPageModel")

It seems that the tabs container model inherits from the dialog model.

The next one has a practical relevance. You may want to use the page model's
TabPageID property. If you create the page model with CreateInstance, the
TabPageID's value is zero for each created page. Nevertheless you can put the
focus to a page (e.g. the first one) with

dialog.getControl("tab").activateTab(1)

But there is no effect, if you try it with

dialog.getControl("tab").activateTab(pageModel2.TabPageID)

It is always the first page.

So you'd better create the pages with createInstanceWithArguments and supply
the IDs:

pageModel1 = tabsModel.createInstanceWithArguments _
                        ("com.sun.star.awt.UnoPageModel", Array(1))
pageModel2 = tabsModel.createInstanceWithArguments _
                        ("com.sun.star.awt.UnoPageModel", Array(2))

Now you can use the pages' TabPageIDs, but you cannot write to them. This
property is read only. The following will succeed:

dialog.getControl("tab").activateTab(pageModel2.TabPageID).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190124/72e49966/attachment.html>


More information about the Libreoffice-bugs mailing list