Here is a test of ListView. In top level widget, two ListView are placed. They use different entry widget class.
The left one use:
The right one use:
Now the right ListView only shows one entry if entry widget has canvas panel, why?
Here is a test of ListView. In top level widget, two ListView are placed. They use different entry widget class.
The left one use:
The right one use:
Now the right ListView only shows one entry if entry widget has canvas panel, why?
If entry widget has canvas panel, the ListView will also can not recevice click event. For example, “On Item Selection Changed” isn’t invoked when click on item.
Isn’t there a scroll bar somewhere? Canvas will probably occupy a lot of space.
If entry widget has canvas panel, the ListView will also can not recevice click event. For example, “On Item Selection Changed” isn’t invoked when click on item.
What are we clicking on? The text (Visible
by default) or the canvas (Not Hit-Testable (Self)
by default).
The panel size seems doesn’t related with occupying space. Because after I resizing canvas panel to a small size, the ListView remains the same situtation that only has one entry.
And yes, in situtation that only has one entry, we can’t see scoll bar.
My mistake, didn’t clearify my description.
What I wish to click on is the text.
I don’t think this part works the way you think. If in doubt, run the widget reflector to see what the widgets are doing. And / or post the script responsible for adding the misbehaving widgets to the list view. And do clarify whether we’re dealing with a widget components or not - the Desired Size has to come from somewhere.
I add two item for each ListView
So it was never one entry, right? It was many overlapping ones, which stems from the below cause:
Something must dictate the widget’s Desired Size
. If you want to use the canvas, select the Text Block
and tick Size To Content
- this will produce a value that will propagate to the canvas and, most importantly, bubble up the hierarchy and tell the List View (or any other container,really) the space this widget wishes to occupy. The list view can then put a clamp on that or respect the child size.
This is a general 101 of how widgets work. A child demands a size, the parent can respect it or not. If the child does not specify, the parent will decide. In your case, the canvas couldn’t tell the text block size, thus the list view treated them as 0,0 dimensions.
Precisely, you’re working in a Designer. It merely emulates what is going to happen so it’s easier to work with. But you must ensure it actually happens run-time, too.
You are right, I never have concept of propagating size before, thank you for your patient!