AW: Project toolkit

Dear Chris,
I'm going to have a look at it!
Thank you.
Best regards,
Oliver

···

-----Ursprüngliche Nachricht-----
Von: Chris Barker [mailto:Chris.Barker@noaa.gov]
Gesendet: Mittwoch, 28. April 2004 20:10
An: wxPython-users@lists.wxwidgets.org
Betreff: Re: [wxPython-users] Project toolkit

Mike C. Fletcher wrote:

Oliver Walczak wrote:

I would imagine FloatCanvas might be a good starting point.

Yes, it might. Go to :

http://home.comcast.net/~chrishbarker/FloatCanvas/

to check it out, but if you're going to use it for real, get in touch
with me, it's under active development at the moment.

-Chris

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hi,
I'm trying to set custom grid cell editor in my custom grid table
model but it just fails and I don't understand what's wrong there.
What am i doing wrong ?

- --
Vladimir Iliev

xx.py (4.25 KB)

Vladimir Iliev wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
I'm trying to set custom grid cell editor in my custom grid table
model but it just fails and I don't understand what's wrong there.
What am i doing wrong ?

Since I can't read your mind I have no idea. Please reproduce your
problem in a small sample app and send it to the list so people can take
a look at what you are trying to do.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

Vladimir Iliev wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
I'm trying to set custom grid cell editor in my custom grid table
model but it just fails and I don't understand what's wrong there.
What am i doing wrong ?

Since I can't read your mind I have no idea. Please reproduce your
problem in a small sample app and send it to the list so people can take
a look at what you are trying to do.

Oops, I didn't see your attachment before. I'm looking at it right now...

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

Robin Dunn wrote:

Vladimir Iliev wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
I'm trying to set custom grid cell editor in my custom grid table
model but it just fails and I don't understand what's wrong there.
What am i doing wrong ?

Since I can't read your mind I have no idea. Please reproduce your
problem in a small sample app and send it to the list so people can take
a look at what you are trying to do.

Oops, I didn't see your attachment before. I'm looking at it right now...

Change your table class to manage the editor like the following. I think there are some docs on the wiki about managing the reference counts of the attrs, editors, and renderers:

class TestGridModel(wxPyGridTableBase):

     def __init__( self ):
         wxPyGridTableBase.__init__(self)
         self.rows = [['A','B'], ['A', 'B']]
         self.cols = ['a','b']
         dict = {'A':'A Description_of_A',
    'B':'B Description_of_B'}
         self.editor = CustomCellChoiceEditor(dict, true)

...

     def GetAttr(self, r, c, *args):
         attr = wxGridCellAttr()
         self.editor.IncRef()
         attr.SetEditor(self.editor)
         return attr

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

Since I can't read your mind I have no idea. Please reproduce your
problem in a small sample app and send it to the list so people
can take a look at what you are trying to do.

Sorry, I've attached an example app but didn't mentioned it in the
email. See the attachment.

- --
Vladimir Iliev

xx.py (4.25 KB)

Robin Dunn wrote:

Robin Dunn wrote:

Robin Dunn wrote:

Vladimir Iliev wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Hi, I'm trying to set custom grid cell editor in my custom
grid table model but it just fails and I don't understand
what's wrong there. What am i doing wrong ?

Since I can't read your mind I have no idea. Please reproduce
your problem in a small sample app and send it to the list so
people can take a look at what you are trying to do.

Oops, I didn't see your attachment before. I'm looking at it
right now...

Change your table class to manage the editor like the following. I
think there are some docs on the wiki about managing the reference
counts of the attrs, editors, and renderers:

class TestGridModel(wxPyGridTableBase):

def __init__( self ): wxPyGridTableBase.__init__(self) self.rows =
[['A','B'], ['A', 'B']] self.cols = ['a','b'] dict = {'A':'A
Description_of_A', 'B':'B Description_of_B'} self.editor =
CustomCellChoiceEditor(dict, true)

...

def GetAttr(self, r, c, *args): attr = wxGridCellAttr()
self.editor.IncRef() attr.SetEditor(self.editor) return attr

Thanks a lot, now it works!

- --
Vladimir Iliev