Johannes Öberg wrote:
Ah, the beauty of Basic! :-)

Thanks!
/J

2010/4/29 Bernard Marcelly <marce...@club-internet.fr>

Hi Johannes,

Message de Johannes Öberg  date 2010-04-29 15:11 :

 How can I set the BackgroundColor of a label to transparent from a macro?
When I Xray BackgroundColor after setting it to "Default" from the Form
designer, it says it is of type Empty. Should i remove the property? How
do
I do that?

Sorry if this is a stupid question again; I have googled for over 1h and
not
found an answer.


No so stupid...
You should have specified if the label is in a form or in a dialog, things
may be different.
This solution _nearly_ works. I tested it for a label in a form.

' *** Basic ***
'   k is the model of the control
Dim nocolor As Variant
k.BackgroundColor = nocolor

The trick is that a declared Variant is initialized as : empty !
Well, it _nearly_ works because the page of the document is not repainted.
You have to change the page and return, or at least set the control out of
the displayed zone.
Someone else will find out how to trigger repaint...
for a dialog:

       oWin =GetWindowOpen("DialogTitlename")
oWin.invalidate(1)
Regards
 Bernard




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to