Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rudywelvaert
Creator
Creator

Set/Change X, Y, Width and Height using variables

Hi,

can the position of an sheet object be parameterized using variables?

Or is there a work around?

This is the reason why I want to do this:

On a sheet I have put several list boxes one on top of the other. Only one or none of the list boxes can be visible.

They are made visible with the use of buttons: if one button is clicked, the associated list box is made visible, using a variable that is set on 1 and the visible one is made invisible by setting it's variable to 0.

To make the visible list box invisible without making an other list box visible using the buttons, I place a text box (with e.g. the letter X in it) over the header of the list boxes.

I want to use only one of those text boxes to close any of the visible list boxes.

By clicking on the text box all the variables associated with the several list boxes are set to 0: non of the list boxes are visible.

So far so good, but there is one layout problem.

I could place the X on the very left side of the list boxes and add extra spaces in the list box header text so the X is not over the header text. In developer this works, but in WebView, the spaces are eliminated and the X hangs over the header text anyway.

I could place the textbox on the right side of the header of the list boxes, but not all the list boxes have the same width.

So can I calculate it's position depending on the list box that is visible: TextBox.X = ListBox.X + ListBox.Width - OffsetFromRight

In other words, can I parameterized the positionof the textbox?

RW

2 Replies
marcus_sommer

Without macros whose using isn't recommended (and which didn't work with webview) there is no way to achieve this.

Further I'm not sure if it's best way to get a certain usability in using a lot of variables/buttons/actions to control the visibility of multiple listboxes. Maybe the use of dimension-groups or the use of listboxes within a container is easier to develop and better to understand from the user.

- Marcus

rudywelvaert
Creator
Creator
Author

Thanks Marcus,

Originally we used a multi box, but our customers were not happy with that.

Also a container gave us serious layout problems.

In the end we chose to use the same button to make the list boxes visible to make it invisible again.

We left the the "close button" (100% transparent text box with e.g. S in Wingdings 2) out of scoop.

RW