Qlik Community

QlikView Extensions

Discussion Board for collaboration on QlikView Extensions.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
alexdp19
New Contributor II

Move object dynamically

Hello,

I'm trying to create an extension which change the position of objects, depend on variables.

I have created a macro to do that.

But macro doens't works on webview.

Now, I trying to transforme my macro into an extension.

Is anybody can help me to do that?

Below my macro:

SUB Position()

  TopSCCTitle = 70

  TopSCCMenu = 95

  LeftPos = 800

  if ActiveDocument.Variables("vDisplayMenuSCC").GetContent.String="1" then

    TopFamilleTitle = TopSCCMenu + 125

    TopFamilleMenu  = TopFamilleTitle + 25

  ELSE

    TopFamilleTitle = TopSCCTitle + 25

    TopFamilleMenu  = TopFamilleTitle + 25

  END IF

  '//LABELMenu_SCC

  set obj = ActiveDocument.GetSheetObject("LABELMenu_SCC")

  pos = obj.GetRect

  pos.Top =  TopSCCTitle

  pos.Left = LeftPos

  obj.SetRect pos

  '//Menu_SCC

  set obj = ActiveDocument.GetSheetObject("Menu_SCC")

  pos = obj.GetRect

  pos.Top = TopSCCMenu

  pos.Left = LeftPos

  obj.SetRect pos

  '//LABELMenu_Famille

  set obj = ActiveDocument.GetSheetObject("LABELMenu_Famille")

  pos = obj.GetRect

  pos.Top = TopFamilleTitle

  pos.Left = LeftPos

  obj.SetRect pos

  '//Menu_SCC

  set obj = ActiveDocument.GetSheetObject("Menu_Famille")

  pos = obj.GetRect

  pos.Top =  TopFamilleMenu

  pos.Left = LeftPos

  obj.SetRect pos

END SUB

Thank you

Regards,

Alex

Community Browser