GridContainer to occupy full width available

JedJed Posts: 2Member
I am trying to create a grid where each cell is consistently sized and the grid container takes up the full width of its parent node. For e.g., if the parent node is 200 wide, a grid container of 4 columns and 8 child nodes will have 8 cells at 50x50. This is for an inventory system if that helps to visualise. I've played around with all of the settings within the inspector with no luck, so perhaps GridContainer simply does not allow for this kind of behaviour? Any assistance will be greatly appreciated!

Answers

  • razvanc-rrazvanc-r Posts: 56Member
    edited September 2016
    This should be achievable using the 'fill' & 'expand' options under 'size flags' for controls in the inspector (for the children nodes). I haven't found any documentation on them so you'll have to pretty much experiment, but I think it should be doable. Sorry can't be much more helpful.

    If I'm not mistaking you want something like this:

    http://imgur.com/a/Q0Hpu

    Take a look at the 'size flags' in the inspector
  • JedJed Posts: 2Member
    Yes that is exactly what I am after! I was playing around with fill and expand on the gridContainer itself (I guess kind of stuck on the idea of how a HTML table works), so I'll play around with them on the child nodes. Documentation certainly would be helpful considering "fill" and "expand" seem pretty much synonymous to me in this context. Thank you very much for the assistance—I'll try it out and mark this as answered assuming I can get it to work as per your screenshot.
Sign In or Register to comment.