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


On 05.01.2015 21:56, jan wrote:
Hi,

it seems that in Basic I can hide a control in a dialog simply with 

oControl.Visible=false

But I am totally at a loss on how to do this from a C++ extension? 

Reference< XControl > c_1 =
xControlContainer->getControl(OU("txt_ActionParameter1"));
c_1->Visible = false; // doesn't exist
c_1>setVisible(false); // doesn't exist

I can't find this "Visible" property in the API documentation of XControl,
either!

BASIC does some magic with identifiers, it uses reflection to look for
methods like "getVisible" and "setVisible" on the component.

probably it is finding com::sun::star::awt;:XWindow::setVisible() in
this case. something like this may work:

 Reference<XWindow> xWindow(c_1, uno::UNO_QUERY);
 xWindow->setVisible(false);


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.