How to make visible that control ?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

How to make visible that control ?

Post by arfgh »

I have a image control that i hide from design time.
With basic i want to make it visible, and it isnt working. But works the reverse, from visible in design time to be hidden from basic.

why ?

Code: Select all

oForm = Event.Source.Model.Parent
   oImg = oForm.getByName("ImagePrev")
   thiscomponent.currentcontroller.getcontrol(oImg).setVisible(true)

help, thx in advance
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
User avatar
Zizi64
Volunteer
Posts: 11362
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: How to make visible that control ?

Post by Zizi64 »

Can you upload your example ODF file (with the macro code and the control) here?
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Davte
Posts: 16
Joined: Sat Sep 10, 2016 11:29 pm
Location: Italy

Re: How to make visible that control ?

Post by Davte »

Have you tried

Code: Select all

thiscomponent.currentcontroller.getcontrol(oImg).EnableVisible = True
? As Zizi64 said, a more detailed example may be useful.
OpenOffice 4.1.2 on Windows 10
Post Reply