Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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
Honored Contributor II

Re: Dynamic positioning for objects?

Hi.

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

Not applicable

Re: Dynamic positioning for objects?

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

whiteline
Honored Contributor II

Re: Dynamic positioning for objects?

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.

joaquinlr
Valued Contributor II

Re: Dynamic positioning for objects?

Hi whiteline

Fantastic link!!!!!!

paulwalker
Contributor

Re: Re: Dynamic positioning for objects?

Hi WhiteLine,

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

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

PFA,

Not applicable

Re: Dynamic positioning for objects?

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