[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Testing for button in a table in OcempGUI



Hi all,

I have a Table(15, 15).
In this table I put specific buttons at random positions and at the rest of the positions I want to put random letters.


The way I do it now is to put my specific buttons in first and then the random ones.
The problem is that when I get to a position in the table where a specific buttons is in, my script stop: "Exception: Cell (7, 13) already occupied". I understand this, but how do I test for a position in a table and go on to the next available position? Is there a 'table.have_child()' or something else I can test it with?


Thanks,
Johan