Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to set a Background Image for TextBox with Macro

Hi everybody,

how do I change the background image of a TextBox?

Thanks

Function changeBG(pg)
IMG_PATH = "T:\EDV\Qlickview\src\img\katalog"

Set d = ActiveDocument
Set tA = d.GetSheetObject("katalog_akt")
Set tV = d.GetSheetObject("katalog_vor")

Set tVp = tV.GetProperties
Set tAp = tA.GetProperties


tVp.Layout.BkgImageSettings.Image = IMG_PATH & "2009" & pg & ".jpg"
End Function

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Considering all the bad reputation that Macros had earned, I'd recommend alternative solutions:

1. Conditional Show - create two or more text objects, with show conditions dependent on a variable, and set the variable when you need, using Actions.

2. Use "Info" load and function "Info" for the images (see Sample "Presidents" for example)

View solution in original post

4 Replies
Not applicable
Author

Hello,

May I ask you, why you want to use a Macro when you can set the Image directly for the background?

ANDY

Not applicable
Author

Hi Andy,

i have 2 Buttons "Prev and Next", and i want change the Background Image from my TextBox when i clicked one of the Buttons.

Not applicable
Author

Hello,

I am also interested in the solution for this problem... anyone?

Greetings

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Considering all the bad reputation that Macros had earned, I'd recommend alternative solutions:

1. Conditional Show - create two or more text objects, with show conditions dependent on a variable, and set the variable when you need, using Actions.

2. Use "Info" load and function "Info" for the images (see Sample "Presidents" for example)