[wxruby-users] Add values in GridCellChoiceEditor

David Beswick dlbeswick at gmail.com
Tue Apr 12 06:11:30 EDT 2011


Hi Marija, that's strange because Ruby doesn't really have a way to cast
between types. Maybe it's a SWIG problem. Could you post a small code sample
that shows the issue?

On Tue, Apr 12, 2011 at 7:01 PM, Marija Velickovic <lists at ruby-forum.com>wrote:

> Hi again,
>
> I've found possible solution for this problem in WxPython Wiki pages
> http://wiki.wxpython.org/GridCellChoiceEditor
>
> from this page:
> "A common question is how to dynamically update the list in a
> GridCellChoiceEditor. The problem comes from not having direct access to
> the underlying ComboBox widget in the grid editor. Fortunately the grid
> editor throws an event that allows us to get to the underlying
> ComboBox."
>
> I convert Python code for Ruby but I have a problem how to get
> underlying ComboBox from GridCellChoiceEditor
>
> If I use Wx::GridEditorCreatedEvent.get_control function (like in Python
> code - line 249 on wiki page), I get Wx::Control object instead of
> Wx::ComboBox or Wx::Choice.
>
> So question is how to convert Wx::Control object to Wx::ComboBox to be
> able to dynamically change list of its values.
>
> Hope somebody has an answer,
> Marija
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20110412/52a9b197/attachment.html>


More information about the wxruby-users mailing list