[Solved] Drawing object properties

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
johnnyideal
Posts: 6
Joined: Wed Nov 02, 2016 1:20 am

[Solved] Drawing object properties

Post by johnnyideal »

Hi, I am trying to make rectangle shape transparent with a macro and also insert text from a variable and then make the text 50% transparent. I tried to record this but it didn't work. Any help would be appreciated. Thank you!! :?:
Last edited by johnnyideal on Wed Mar 01, 2017 4:03 pm, edited 1 time in total.
OpenOffice 4.1.2 on Windows 7
User avatar
Zizi64
Volunteer
Posts: 11360
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Drawing object properties

Post by Zizi64 »

Hi, I am trying to make rectangle shape transparent with a macro and also insert text from a variable and then make the text 50% transparent. I tried to record this but it didn't work. Any help would be appreciated. Thank you!! :?:
The macrorecorder has a limited capability.
You need study and use the StarBasic (or other supported programming language) AND the functions of the Application Programming Interface (API).
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.
FJCC
Moderator
Posts: 9277
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Drawing object properties

Post by FJCC »

I made a Draw document with one simple shape and this code changes the transparency

Code: Select all

  oDrawPages = ThisComponent.getDrawPages()
  oDP = oDrawPages.getByIndex(0)
  oShape = oDP.getByIndex(0)
  
  oShape.setPropertyValue("FillTransparence", 50)
That does not answer how to pick out the shape in your case. Also, I do not see a way to make the text transparent, though I did not search for long.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Post Reply