#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    3
    Rep Power
    0

    Question wxPython question


    hi
    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?
    bye
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    27
    Rep Power
    0
    Originally Posted by ecipecipec
    hi
    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?
    bye
    Each cell of the grid you are envisioning, is it just a box of color, or does it need to contain text as well?

    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.

    Derrick

IMN logo majestic logo threadwatch logo seochat tools logo