Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to set the transparency of a textbox with a macro?

I searched for a while in the api guide and in this qlikview community, but found no answer.
Is there a possibility to create a textfeld with a transparent background?
I have problems to find the macro code for setting the background to transparent.

Thanks for your help.

1 Solution

Accepted Solutions
Not applicable
Author

You may try this sample code. I hope this helps.

Public Sub SetOpacity
set mytext = ActiveDocument.ActiveSheet.CreateTextObject
prop = mytext.GetProperties
prop.Layout.Text.v = mytext.GetObjectId
prop.Layout.BkgAlpha = 0
mytext.SetProperties prop
End Sub

View solution in original post

5 Replies
Not applicable
Author

Nobody any idea?

Not applicable
Author

Hi,

In the text box,when you right click in it you will get 'Properties'.In that there is one 'General' tab,There,in right side down you can find the

'Transparency' from0% to 100%.as per your you can select that one

Thanks & Regards

Jai

Not applicable
Author

Of course i can select it manually, but how to set it via macro?

Not applicable
Author

You may try this sample code. I hope this helps.

Public Sub SetOpacity
set mytext = ActiveDocument.ActiveSheet.CreateTextObject
prop = mytext.GetProperties
prop.Layout.Text.v = mytext.GetObjectId
prop.Layout.BkgAlpha = 0
mytext.SetProperties prop
End Sub

Not applicable
Author

pinogs: Thats was what i searched for. Thank you so much.

The answer is: prop.Layout.BkgAlpha = 0 (0=100% Transparency).