Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to change the External Image dynamically in QlikView?
Hi Michael,
I have solved the issue :-
Sub SetWall
set textImg = ActiveDocument.getsheetobject("TX08")
set picture = ActiveDocument.Variables("vP").GetContent
set tp = textImg.GetProperties
tp.Layout.Text.v = picture.string
textImg.SetProperties tp
End Sub
Thanks,
Manish
If you're talking about changing an external image that is used for the background on a text box or chart or something, I have not found a way to do that using macros. I may be missing it in the API guide, but I could not find anything about image source.
I came up with a workaround to use multiple text boxes with the images I need. I then put them in the exact same position and base their visibility on a variable. In order to change the image, you just change the variable.
Hi Miller,
Thanks for ur reply.
Actually I need to develop a Administrator Panel kind of application in which I can change the Image of the QV page with the file available on my local disc. This is similar kind of functionality which is availabe with the Text Box to change the background image.
- Manish
Manish,
Is it what you want:
sub WP
set picture = ActiveDocument.Variables("vP").GetContent
status = ActiveDocument.SetWallPaper (picture.string , 1)
end sub
Variable vP contains the full path and name of the image.
Hi Michael,
I want the functionality similar to :
Sub SetWall
set textImg = ActiveDocument.GetSheetObject("TX08")
set tp = textImg.GetProperties
rem Setting the Background Image of Text
textImg.SetProperties tp
End Sub
Thanks,
Manish
Hi Michael,
I have solved the issue :-
Sub SetWall
set textImg = ActiveDocument.getsheetobject("TX08")
set picture = ActiveDocument.Variables("vP").GetContent
set tp = textImg.GetProperties
tp.Layout.Text.v = picture.string
textImg.SetProperties tp
End Sub
Thanks,
Manish
Interesting.
I have tried the code exactly as it is written except that i have TX09.
All I get is the path to the image as text in the textbox. Not the actual image.
Are there some more settings I have to do?