Python
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Python

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old March 11th, 2008, 06:50 AM
Tim van der Leeuw
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Dynamically updating GridCellChoiceEditor combo-box contents?

Hi,

I have a grid containing some data. In one of the columns, the data is
selected from a predefined list using a GridCellChoiceEditor.

However, I want to be able to dynamically add items to, and remove items
from, this choice-list, and I'm not finding a reliable way to do so.

The GridCellChoiceEditor has a Control, wich is a wx.Choice control. I can
manipulate the contents of that control to my hearts content and the list
with choices is updated. Great.

However, there are a couple of caveats:
1. The Control is not created before the user first invokes the cell-editor.
So before the user does that, I can not add or remove items.
2. Sometimes, the GridCellChoiceEditor itself is already deleted while I'm
trying to add/remove items! I don't know how/when that can happen. (Should I
manually increase/decrease the ref-count to it in my program, to let WX know
that I'm keeping a reference to it?)
3. There's a method SetControl() on the GridCellChoiceEditor, but invoking
the editor after using this method with a manually-created wx.Choice control
just crashes the program, hard.
4. There's a method Create() on the GridCellChoiceEditor which creates the
Control, but it needs an EvtHandler instance, and I don't know where to get
the proper one. I've tried a couple of things more-or-less at random, but it
just leads to crashes.
5. I could perhaps create a new GridCellChoiceEditor and call
grid.SetCellEditor() again for the cells involved, but I tried that, it
crashed too.


Does anyone have any helpful clues for me?

Regards,


Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Python > Dynamically updating GridCellChoiceEditor combo-box contents?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway