Skip to content

Provide a way to lookup elements by x,y grid position in GridLayout #43

Closed
@FoamyGuy

Description

@FoamyGuy

Currently the sub-elements within a GridLayout can be accessed by index of the order that they were added:

my_grid_layout[0]

Will return the first element that was added to the grid so that you can access it's properties i.e.

my_grid_layout[0].color = 0xFFFFFF

would change the font color of a Label that was the first item added.

It would be great to provide an alternate way to lookup the elements in the grid based on their x,y cell location so that you could do something like:

my_grid_layout.get_element(0,0).color = 0xFFFFFF

and it would give you back the element in the first row / column without needing to worry about the order that the elements were added in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions