Using ListLayout for grouped items inside a ListView with GridLayout - microsoft-metro

Suppose I have a ListView with grouped data and a GridLayout. I'd like to have a vertical list for the items inside a group (each group represented in yellow) and the horizontal list for each group.
Can I do this using a ListView?
(the arrows represent the expected scrolling)

Keep in mind that this sort of combination of scrolling directions is not recommended according to the Windows design principles. A single panning axis gives a user a solid feel as if they're interacting with real content, but combined scrolling tends to disorient. Especially when the user is scrolling with a mouse wheel.
It likely won't fail you in certification, but I thought I'd just give you some food for thought.

You could have nested ListViews: one, which scrolls horizontally and that displays the items from the groupedDataSource as a normal itemDataSource.
Then have the item renderer for the group items create their own ListViews with a vertical ListLayout in which they display the items from their respective group.

Related

Tableau packed bubbles - arrange the bubbles custom

I'm looking to create a packed bubble graph like the below (size of the bubble corresponds to population, and the color of the bubble corresponds to number of widgets sales). The graph is exactly the way I need it, except that I would like to arrange the countries so that they are grouped by continent. Is there a way to do this in Tableau?
I've tried to recreate a similar scenario even though it's not clear if the bubble color should (or not) be related to a specific field.
That being said, using the superstore dataset, I've "grouped" customers by region (color) so they are some how aligned through inner circles.
In order to do so, I just sorted the region pillow in the detail section.
See below.

Flutter: Differences between SliverList and SliverFixedExtentList

What are the differences between SliverList and SliverFixedExtentList in Flutter?
According to the documentation of each widget:
SliverList: "A sliver that places multiple box children in a linear array along the main axis."
SliverFixedExtentList: "A sliver that places multiple box children with the same main axis extent in a linear array."
It seems that we should use SliverFixedExtentList over SliverList if all children have the same main axis extent. However, what does "same main axis extent" really mean?
It means all children have the same height. If you are familiar with ListView, it has itemExtent property that does the same thing.
Essentially, if you cannot guarantee all list items will have "equal size on the main axis" (e.g. equal height on a vertical scrolling list, or equal width on a horizontal scrolling list), then we cannot know the "exact size" of each item in the list, until we load it. However, if you can guarantee that they will all have the same size, for example, 100 units in height, then we don't need to load each item to measure its size.
Knowing item size before loading them is very useful when you want to jump a large distance. For example, if you want to scroll 10,000 px down, and if we know each item is fixed at 200 px tall, then we can easily jump 50 items, just load the 51th item and display it. If we don't know that (if you cannot guarantee that) then we will have to literally lay out all items in-between to see where 10,000 px will land us.

Can't get vertical layout group with scrolling working

I've got a panel which sits above my canvas and slides out upon clicking a button. I want to populate this panel with several objects (the number will be determined at runtime). Since the number of objects can exceed the number that would reasonably fit on a single row of the panel, I'd like to be able to scroll down with the mouse to new rows where the remaining objects have been populated.
To achieve this I've put a Scroll Rect and a Mask on the panel, created a child Image with a Vertical Layout Group to hold a series of child panels representing the rows that would hold the objects, and set the Image as the Content of the Scroll Rect.
The issue is that when I try to make one of the row panels a child of the Image object by dragging it to the Image in the Hierarchy, the anchors for the panel coalesce to a single point (the top left of the Image since it is set to Upper Left alignment) and when I try to manually drag the anchors to the appropriate position a box with a red X in it appears and expands in a manner that doesn't seem to correspond to the direction of the mouse.
Is this the right approach, and if so, how can I get this to work?
Thanks!

How can I enforce vertical alignment of GTK widgets across containers?

I'm using PyGTK on Windows to develop a small application.
How can I enforce vertical alignment of widgets across containers to achieve something like this?
In the mockup, widgets are in separate frames, but I want to maintain vertical alignment as if they were in the same gtk.Table. If I put them in the same table then I can't put a gtk.Frame around the groups of widgets.
Maybe it's already too late for you, but for other people that find this question. You can create an array of SizeGroup with 8 elements, and add to each element every widget that should go on the same column, this will make the width of each cell on the respective grid to be the same size, if all widgets are added, this will have the side effect of also align them vertically. Just be sure the amount of columns in the grid below is the same as above.
Also, if your labels need some special alignment there is currently a bug that does not let you use halign and valign when using SizeGroup, see https://bugzilla.gnome.org/show_bug.cgi?id=733981 .

Evenly aligning things in IB

I have ten labels on a view positioned vertically. I need to evenly space them. Does IB have any type of setting that will do this?
If you select individual labels and drag them around the view, they should "snap" to certain guides around the interface. If you drag an element close to another element it should snap to about 8 pixels away, and that's the standard spacing between elements on the iPhone.
If you want more precise control, you can select an element and use the arrow keys to move it around one pixel at a time.
You can also use the Align Horizontally/Vertically in Container menu items from the Layout menu.
Do the math and then type in the X,Y coordinates. Unfortunately, I think that is the easiest way.
If you are OK using Apple's guideline spacing, dragging one label near another will generate a dashed line at a certain point. Do this for each label below the next, and they will be evenly spaced.