Hello everyone, I have the following problem. When I use a dropdown list and allow multiple options, there are too many options in the small field. However, it is not possible to view the options because you cannot scroll or resize the window.
My idea was to use two buttons and have them increase the size of the window on click and then decrease it again.
However, when I click on them, the data type of width and height changes from value to array and creates two arrays. This is my code and this is how width and height look like.
def runAction(self, event):
self.getSibling("AAA").position.height = 100
self.getSibling("AAA").position.width = 259,14
Sorry for the late response, I was on vacation. Can you tell me exactly what you mean by POSITION.height.auto
and at which event I should write that? Is this a way for the size of the list to adjust automatically?"
I think this is what he means:
1 Like
I have now set Ergebnis to auto, and the height now changes to this standard size. Can I also change the standard size so that it remains as large as the rest (here like clients)?
And if I have too many options, then the dropdown hides other dropdown lists. Can I compress these or should I expect that this can happen?
Concerning the issue in the first post:
You're not giving width
and height
integers, but arrays. How ? By using a comma instead of a dot. 259,14
is NOT a decimal number, it's two separate integers. The comma makes it a tuple, which you then assign to width
or height
, and ignition interprets this as an array. Replace the comma by a dot and the issue should go away.
Concerning the overlap of your components: if your components sizes can change dynamically, you need to account for this when placing other components.
You seem to be using a coordinate container. You COULD keep using this, and calculate the sizes of everything, and use this to calculate the positions of your components...
But I STRONGLY suggest you switch to a flex containers. Flex containers behavior is VERY different and you might find it difficult to work with them at first, because you can't place things manually in them, but believe me it will make your life much simpler in the long run.
Take some time to get used to them. You can also find explanations on the internet, it's based on flexbox.
Using flex containers, the positions of your different components will be automatically calculated and adjusted if other components are changed dynamically.
3 Likes
Thank you, I can now open and close it with the buttons. I forgot that in Germany, commas and periods are exactly the other way around. I am working on the project for my master's thesis, and I think I won't have enough time to change everything to flex container, but thank you for the tip!
We have the same comma/dot situation in France, so I understand. It's always fun when you need merge data that comes from differently localized documents ;D
Try it on this page, you'll quickly see if it takes too long or not.
In the long run, it might save you more time than the what you'll need to invest to first understand how it works.
2 Likes
I can imagine it .
I will try it, and then I will see what I do.
Keep in mind you can add flex containers in a coordinate based page, if it makes things simpler for you (ie. your page contains a bunch of other things that are better served by a coordinate conatiner)