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

Dynamic positioning for objects?

Hello!

I'm trying to create a dynamic dashboard where the user gets to decide which object goes where on a tab.

For example, I would like to have 9 positions on a dashboard-tab. And on another tab, the user gets to decide which objects he/she wants on the dashboard-tab. The challenge is, however, that if the user selects only 3 objects, these 3 objects should be placed on the top. So regardless of which objects and how many the users chooses, they you start from the top and not one object up to the left and one down to the right.

Do I make any sense?

Has anyone tried this? I know there's now way to add formulas to X and Y variables so is there another smart way of doing this?

6 Replies
whiteline
Master II
Master II

Hi.

I think the only way to change  the size and position of objects is to use macro and API Guide.

Not applicable
Author

Okey, I was afraid of that. Is there any examples of this?

whiteline
Master II
Master II

rem ** move all objects on active sheet 20 pixels down and 15 right **

set sh = ActiveDocument.ActiveSheet

for i = 0 to sh.NoOfSheetObjects-1

    set obj = sh.SheetObjects(i)

    pos = obj.GetRect

    pos.Top = pos.Top + 20

    pos.Left = pos.Left + 15

    obj.SetRect pos

next

You can find more info about object properties here http://community.qlik.com/docs/DOC-2640.

Joaquin_Lazaro
Partner - Specialist II
Partner - Specialist II

Hi whiteline

Fantastic link!!!!!!

paulwalker
Creator III
Creator III

Hi WhiteLine,

How to use in my application,................

in webview i am getting space between 2 charts........

PFA,

Not applicable
Author

Hi Whiteline

could you please help me to write a macro for moving a text box based on the value of the variable?

I mean.. I would like to move the text box if the variable assigned to text box changes..

Thanks in advance

regards

Ganesh