I think what you are doing can be done with tgui::Grid if you use tgui::Label instead of sf::Text. But that is of course not possible if you need to do something with the text that the Label class doesn't support. Using a grid will make positioning easier (you just have to say in which row and column, not an exact position), but you will have to play around a bit with the borders that you set around widgets so that the texts don't glue to each other.
For the problem with the checkboxes, my guess is that you don't take the text.getLocalBounds().top into account. If you draw text with sfml then there are always a few empty pixels above the character. This could explain why the checkboxes are placed too high.
So you should try with
Edit: I was hoping that Grid still supported a way to set the row height, but looking at the documentation it seems like it was removed. So you should probably forget about using a Grid if you want each row to have the exact same height.
For the problem with the checkboxes, my guess is that you don't take the text.getLocalBounds().top into account. If you draw text with sfml then there are always a few empty pixels above the character. This could explain why the checkboxes are placed too high.
So you should try with
Code (cpp) Select
initPos.setPos(colsOfText[0].getPosition().x + colsOfText[0].getLocalBounds().top, colsOfText[0].getPosition().y);Edit: I was hoping that Grid still supported a way to set the row height, but looking at the documentation it seems like it was removed. So you should probably forget about using a Grid if you want each row to have the exact same height.
(the text was visible but the window did not resize correctly)