July 27th, 2004, 09:38 AM
I am new in wxPython and I need some help.
I have to do GUI which has 10*10 matrix, filled with red or green fields depending on a values from a database. green for 0 and red for 1 in database. how can I do it, do I use grid for matrix?
August 26th, 2004, 11:55 PM
Each cell of the grid you are envisioning, is it just a box of color, or does it need to contain text as well?
Originally Posted by ecipecipec
Either way, there are numerous ways you could implement this. You could use the grid package in wxPython, but it sounds like it might be more straightforward for a simple 10x10 matrix to just display a matrix of wx.Panel's or something of the like. The Panel colors can easily be updated based on your data. If the values also need to be displayed, then you could use a StaticText or a TextCtrl control. And you can change the colors with these the same as with the Panels.
Hope this helps. Email me if you would like more details.