Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

I'm creating a new ToolPanel for my product.

I want to a an image which is the icon of a remote document, which can
be edited in LO.

I can't display image. If I inserted a button with the same image, the
button displays correctly the icon but not the controlImage.

What I've missed ?

Here's the portion of the code which add components.

Regards,

Ludovic SMADJA

************************ Code start ***************************

Object btnControl = ControlHelper.createControl(mainPanel.getContext(),
        "UnoControlButton", 0, position, 20, fontHeight, 
        new String[]{"ImageURL", "BackgroundColor"}, 
        new Object[]{imgUrl, 0xff1234});
XControl xBtnControl = UnoRuntime.queryInterface(XControl.class,
        btnControl);
searchResultPanel.addControl("img_" + i, xBtnControl);

Object imgControl = ControlHelper.createControl(mainPanel.getContext(),
        "UnoControlImage", 20, position, 20, fontHeight,
        new String[]{"ImageURL", "BackgroundColor"}, 
        new Object[]{imgUrl, 0xff1234});
XControl xImgControl = UnoRuntime.queryInterface(XControl.class, 
        imgControl);
searchResultPanel.addControl("img2_" + i, xImgControl);

Object docControl = ControlHelper.createControl(mainPanel.getContext(),
        "UnoControlFixedText", 40, position, size, fontHeight,
        new String[]{"Label"}, 
        new Object[]{name});
                            
XControl xDocControl = UnoRuntime.queryInterface(XControl.class,
        docControl);
searchResultPanel.addControl("doc_" + i, xDocControl);

************************ Code end ***************************

-- 
ludovic <ludovic.smadja@jalios.com>
JALIOS SA R&D


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.