Hello to all,
in draw I want set the color of the layer-name or the background color of the tab
like it is happens when the layer is set on not visible, then the the name color turns from black to blue
My wish is to lock, unlock the active layer with a macro and also set the color of the layer name to red if the layer is locked.
I am able to lock the layer but I don't find/ see in XRAY/MRI a way to set the color.
Is someone out there, who can tell me how I can set the color or background color of the layer name?
thank you ahead
[Solved] Draw layer name color
[Solved] Draw layer name color
Last edited by MrProgrammer on Wed Nov 05, 2025 10:01 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]; Lock ancient topic
Reason: Tagged ✓ [Solved]; Lock ancient topic
Apache OpenOffice 4.1.16 on Win 10
Re: Draw layer name color
I suppose it means: there is not any way, there is not public property or method for this. (Except: You modify the source code of the Apache OpenOffice or the LibreOffice, because AOO/LO are open source office suites.)I don't find/ see in XRAY/MRI a way to set the color.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.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.
PortableApps: LO3.3.0-25.8.5.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.
Re: Draw layer name color
Hello Zizi64,
thanks for the fast reply, my own knowledge in basic is not so deep
and you suppose or are you sure ?
for my using of MRI XRAY, I will quote a stanza from 3 DOORS DOWN
"Somewhere in this darkness
There's a light that I can't find
Maybe it's too far away...
Or maybe I'm just blind..."
so I still can hope !?
greets
thanks for the fast reply, my own knowledge in basic is not so deep
and you suppose or are you sure ?
for my using of MRI XRAY, I will quote a stanza from 3 DOORS DOWN
"Somewhere in this darkness
There's a light that I can't find
Maybe it's too far away...
Or maybe I'm just blind..."
so I still can hope !?
greets
Apache OpenOffice 4.1.16 on Win 10
Re: Draw layer name color
Please upload your StarBasic code with the XRAY calling. (Or an example .odg file with the embedded macro code.) Then we will see, how you used and examined that Layer Object.and you suppose or are you sure ?
Last edited by Zizi64 on Mon Jun 27, 2016 3:05 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.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.
PortableApps: LO3.3.0-25.8.5.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.
Re: Draw layer name color
Hallo Zizi64 and all others too,
here is my draw test file, to lock/ unlock, hide / show the layer works well,
it would be great to find a way to format additional the layers name in red if the layer is locked.
thanks ahead
here is my draw test file, to lock/ unlock, hide / show the layer works well,
it would be great to find a way to format additional the layers name in red if the layer is locked.
thanks ahead
Apache OpenOffice 4.1.16 on Win 10
Re: Draw layer name color
Just a tip:
If it is not possible to colorize the tabs, then you can use a different marking method.
Use the Title property for storage a variable. Set same string (manually or by a macro) for "Title" property as the "Name" of the layer, and then use this code:
If it is not possible to colorize the tabs, then you can use a different marking method.
Use the Title property for storage a variable. Set same string (manually or by a macro) for "Title" property as the "Name" of the layer, and then use this code:
Code: Select all
oLayer.IsLocked = Not oLayer.IsLocked
If oLayer.IsLocked then
oLayer.Name = oLayer.Title +" [#]"
else
oLayer.Name = oLayer.Title +" [~]"
end if
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.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.
PortableApps: LO3.3.0-25.8.5.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.
Re: Draw layer name color
Hallo Zizi64,
thanks, your idea is not so bad
, so I adapt it
I change little the way, how to manipulate the layer name from Layer to #Layer# and back
but if anyone know or find a way to set the color for the layer name please let me know it too
again thanks to all
thanks, your idea is not so bad
I change little the way, how to manipulate the layer name from Layer to #Layer# and back
Code: Select all
If oLayer.IsLocked then
oLayer.Name = "#" & oLayer.Name & "#"
ElseIf Left(oLayer.Name,1) = "#" and Right(oLayer.Name,1) = "#" Then
oLayer.Name = Mid(oLayer.Name,2, Len(oLayer.Name)-2)
End If
again thanks to all
Apache OpenOffice 4.1.16 on Win 10