<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Jan,</div><div><br></div><div>I found some examples:</div><div><a href="http://www.programcreek.com/java-api-examples/index.php?api=com.sun.star.awt.XControl">http://www.programcreek.com/java-api-examples/index.php?api=com.sun.star.awt.XControl</a></div><div><br>Maybe this can help....</div><div><br><div>Regards</div><div>Oliver</div></div><div><br><div>Am 12.06.2016 um 19:36 schrieb Jan Rheinländer <<a href="mailto:jrheinlaender@gmx.de">jrheinlaender@gmx.de</a>>:</div><br></div><blockquote type="cite"><div>
  
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  
  
    Hi Fernand,<br>
    <br>
    thank you for the tip with UnoControlFixedHyperlinkModel. Now this
    is what I have:<br>
    <br>
    Reference<XDialog> xDialog; // Created from XDialogProvider
    somewhere earlier in the code<br>
    <br>
    First question: How do I get a MultiServiceFactory from XDialog to
    create the control? If I use the MultiComponentFactory the
    properties like "PositionX" etc. are not present<br>
    <br>
    Now assuming I get this MultiServiceFactory from somewhere:<br>
    <br>
    Reference< XPropertySet >
    xPSHyperlink(xMultiServiceFactory->createInstanceWithContext("com.sun.star.awt.UnoControlFixedHyperlinkModel",
    xCC), UNO_QUERY_THROW);<br>
    xPSHyperlink->setPropertyValue("PositionX", makeAny(50));<br>
    xPSHyperlink->setPropertyValue("PositionY", makeAny(30));<br>
    xPSHyperlink->setPropertyValue("Width", makeAny(50));<br>
    xPSHyperlink->setPropertyValue("Height", makeAny(14));<br>
    xPSHyperlink->setPropertyValue("Label", makeAny(OU("Help")));<br>
    xPSHyperlink->setPropertyValue("URL",
makeAny(OU(<a class="moz-txt-link-rfc2396E" href="http://ooo-imath.sourceforge.net/wiki/index.php/Main_Page">"http://ooo-imath.sourceforge.net/wiki/index.php/Main_Page"</a>)));<br>
    <br>
    Second question: How do I get a XControl from the
    UnoControlFixedHyperlinkModel  to add to the ControlContainer?<br>
    <br>
    Reference< XControlContainer > xControlContainer(xDialog,
    UNO_QUERY_THROW);<br>
    xControlContainer->addControl(OU("button_help"),
    xHyperlinkControl);<br>
    <br>
    <div class="moz-cite-prefix">I have looked all over the UNO API but
      am not getting anywhere.<br>
      <br>
      Thanks,<br>
      Jan<br>
      <br>
    </div>
    <blockquote cite="mid:e016cd5a-1731-48fc-a0c6-1bc94668195a@typeapp.com" type="cite">
      <pre wrap="">oDialogModel.createInstance( 
"com.sun.star.awt.UnoControlFixedHyperlinkModel")</pre>
    </blockquote>
    <br>
    <blockquote cite="mid:e016cd5a-1731-48fc-a0c6-1bc94668195a@typeapp.com" type="cite">
      <div class="gmail_quote">On Jun 11, 2016, at 3:24 PM, "Jan
        Rheinländer" <<a moz-do-not-send="true" href="mailto:jrheinlaender@gmx.de" target="_blank">jrheinlaender@gmx.de</a>>
        wrote:
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <pre class="blue">Hi,

is it possible to open a website in the user's preferred browser from a
dialog (or from a Basic macro, or through the UNO API)?

I see that the "Help" - "About" dialog does this, but it is defined in
the source in Glade format, different to the Basic dialogs.

Thanks for any ideas!

Jan

<hr>
LibreOffice mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a>
<a moz-do-not-send="true" href="https://lists.freedesktop.org/mailman/listinfo/libreoffice">https://lists.freedesktop.org/mailman/listinfo/libreoffice</a>
</pre></blockquote></div>
<img moz-do-not-send="true" src="mailbox:///home/jan/.thunderbird/j71zsazh.default/Mail/pop.gmx.net/Drafts?number=515061&upn=9tv5js1W4OHOIfO7HG22sodr9c45uJo9GRay70XQqQsRiO1Ek2viNjoiOy6CLSdCbDwgO9HVvfXj714-2BCDB5AcsrwrfDUbU7Bh5KB3dEVTzJ7PKFzLEurZm7qPcS-2Fq5dyM1rb8xE3NvvY3T0G3wpN1PyzF55i0PYbDeJG1uQ7e5aDtzMVVQ715lRG91ZuLp77xsX2ncMXSgqrzaYaY1wXeEWsQXVtkkS0U2lpMeJu7Y-3D" alt="" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" border="0" height="1" width="1">




</blockquote>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>LibreOffice mailing list</span><br><span><a href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a></span><br><span><a href="https://lists.freedesktop.org/mailman/listinfo/libreoffice">https://lists.freedesktop.org/mailman/listinfo/libreoffice</a></span><br></div></blockquote></body></html>