Yes. There are a few problems here.
1. The parent of your grid was the parent that was the whole panel class,
but that position on screen was overlapping with a second panel (which
you named 'panel'). By giving the grid parent=panel, it now is "really"
there not just a "ghost image" of the grid, and so you can interact
with it. (In general, when things don't work, it is always good to make
sure the widgets have the correct parents).
2. There is no need for this line at the bottom:
self.Frame = wx.Frame(None)
That is just created another frame that you do nothing with, and so if you
close the frame it is still lurking in memory--not good.
3. I had to change all the accented words to get it to run for me, but that
was just the way I had the encoding set up.
4. For the radiobuttons, you need to have a reference to your grid, but
grid was defined in another function, so the radiobutton event handler
function (OnRb2) doesn't know about grid. I made grid to be called
self.grid, so that all functions in the class can access it. To test it
out, put a number in the 0,0 box in your grid and click the second
radiobutton.
The revised version is attached.
HTH,
Che
calculator.py (2.7 KB)
···
On Tue, Nov 3, 2009 at 7:22 AM, Ignacio De Vicente Puyol <ignacio.puyol@gmail.com> wrote:
Hi,
I'm making a project in wxpython. It's a calculus program. It's divided into
different tabs doing each of one different calculus.Well, the problem is than I can't get the info introduced in one of the
columns so in other one of them I could represent a calculus. What's more,
I've introduced some radiobuttons, so clicking on each of them makes
different calculus with the data extracted from the column. I've tried to do
everything, and I'm stuck, I don't know what I have to do.Any ideas of what I should do?