Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

udaya_kumar
Not applicable

I want to show the table on button click, but there will be no space left to show the table

Hi,

Is it possible to show the table and move the other controls down?

Requirement is, Like i will not be giving place for the table to display, whenever i click on the button, it should move all the controls down and show the table in that space, is it possible to do in qlikview?

Tags (2)
1 Solution

Accepted Solutions
swuehl
Not applicable

Re: I want to show the table on button click, but there will be no space left to show the table

You could try like marcsliving suggested. If you want full control over the layout change (poistion and size) you might try a macro like

Sub Move

Set rep = ActiveDocument.GetSheetObject("LB05")

Set fr = rep.GetFrameDef

Set v = ActiveDocument.Variables("vShow")'' MsgBox(v.GetContent.String)

num = v.GetRawContent

pos = fr.Rect

if num = 1 then

pos.Top = pos.Top+ 1000

'pos.Left = pos.Left +100

else

pos.Top = pos.Top- 1000

'pos.Left = pos.Left -100

end if

'pos.Width = 642

'pos.Height = 323

rep.SetFrameDef fr

end sub

or vote here and wait: http://community.qlik.com/ideas/1866

Hope this helps,

Stefan

6 Replies
Not applicable

I want to show the table on button click, but there will be no space left to show the table

I am not sure if there is a way to move objects, but you could create a duplicate set of controls in the new spot that also become visible on the button click

swuehl
Not applicable

Re: I want to show the table on button click, but there will be no space left to show the table

You could try like marcsliving suggested. If you want full control over the layout change (poistion and size) you might try a macro like

Sub Move

Set rep = ActiveDocument.GetSheetObject("LB05")

Set fr = rep.GetFrameDef

Set v = ActiveDocument.Variables("vShow")'' MsgBox(v.GetContent.String)

num = v.GetRawContent

pos = fr.Rect

if num = 1 then

pos.Top = pos.Top+ 1000

'pos.Left = pos.Left +100

else

pos.Top = pos.Top- 1000

'pos.Left = pos.Left -100

end if

'pos.Width = 642

'pos.Height = 323

rep.SetFrameDef fr

end sub

or vote here and wait: http://community.qlik.com/ideas/1866

Hope this helps,

Stefan

udaya_kumar
Not applicable

Re: I want to show the table on button click, but there will be no space left to show the table

Hi Stefan,

Thanks for the code,

its working now, but i want to get back those moved objects back to old place.

how can i do that, can u help me?

udaya_kumar
Not applicable

Re: I want to show the table on button click, but there will be no space left to show the table

Hi stefan,

i checked the code, its working fine.

sorry that i didnt check the qvw file,

thank u very much for help

udaya_kumar
Not applicable

Re: I want to show the table on button click, but there will be no space left to show the table

Hi stefan,

I have one doubt that am using the code which you have given, it's working fine,

but i want to move multiple objects at a time, my doubt is , Is there any other code to move multiple objects at a time or i need to use the same code to move all the objects?

I tried with the same code for other object also, it's moving but i want to know, is there any other option to move multiple objects at a time?

swuehl
Not applicable

Re: I want to show the table on button click, but there will be no space left to show the table

Well, honestly I don't know, but I doubt that there is a built in function that will do that for you.

You could probably just use a loop to iterate over all objects you want to move, the only thing that should differ is the object name in GetSheetObject. Maybe like attached.

Hope this helps,

Stefan