Hi all, I have dialog created by DialogProvider2 and xdl file created in Form Designer, and i want to add Hyperlink to this dialog by java code, because there is no ability to add it in Form Designer.
XDialog dialog = ... XControl dialogControl = .. XControlModel dialogControlModel = ... XNameContainer xNameContainer = QI.XNameContainer(dialogControlModel); Object o = getxMCF().createInstanceWithContext("com.sun.star.awt.UnoControlFixedHyperlink", m_xContext); XControl hyperlinkControl = QI.XControl(o); Object model = QI.XMultiServiceFactory(QI.XControl(dialog).getModel()).createInstance("com.sun.star.awt.UnoControlFixedHyperlinkModel"); XControlModel hyperLinkControlModel = QI.XControlModel(model); hyperlinkControl.setModel(hyperLinkControlModel); XFixedHyperlink xFixedHyperlink = QI.XFixedHyperlink(hyperlinkControl); // ... setting url and text XPropertySet xPropertySet = QI.XPropertySet(hyperLinkControlModel); xPropertySet.setPropertyValue("PositionX", new Integer(100)); xPropertySet.setPropertyValue("PositionY", new Integer(200)); xNameContainer.insertByName("hyperLink", hyperLinkControlModel); QI.XControlContainer(dialog).addControl("hyperLink", hyperlinkControl); dialog.execute(); This have no effect, hyperlink positioned in left upper corner of dialog Maybe it's possible to add hyperlink control to xdl file manually without Form Designer? If it is not possible what am i doing wrong? -- Борисов Антон