Table/Datagrid widget
« on: 25 July 2013, 21:22:56 »
Hi,
I just recently discovered TGUI in combination with SFML.
First of all: Great work! I would really like to integrate TGUI into our linux app.
What I am missing is a kind of table or datagrid widget where you can specify the initial rows and columns for example by passing a vector< vector<string> >

I have not spent much time with gui and therefore, I have no idea how to do that. I've looked over some widget classes but it takes me too long to do it by my own.

I appreciate if you could give me an opinion on this topic.

Kind regards
Jim

*

texus

  • *****
  • 1151
    • View Profile
    • Texus's Blog
Re: Table/Datagrid widget
« Reply #1 on: 25 July 2013, 21:34:08 »
You should take a look at Grid.

If you know all widgets in the table upfront then you can use it.
Just use addToRow to add the widget in the next column and addRow to start a new row.

It currently has its limits though. You can't just change any row or column, you have to add the widgets row by row. But depending on the situation this could be enough.


Edit: The limitation has been removed. You can now add widgets in any row or column, the grid will automatically resize.
« Last Edit: 29 July 2013, 19:23:44 by texus »