List Info

Thread: Choice append




Choice append
user name
2007-08-24 01:47:23
Ciao Alex,

Is it possible to enable the overloaded method 'ControlWithItems#append'; to be able to provide user data?

to do this:

ch = Wx::Choice.new()

ch.append("pluto", 10)
ch.append("pippo", 20)
ch.append("paperino", 30)

instead of this (the way i've found to get the same result):

ch = Wx::Choice.new()

id = ch.append("pluto")
ch.set_item_data(id, 10)

id = ch.append("pippo")
ch.set_item_data(id, 20)

id = ch.append("paperino")
ch.set_item_data(id, 30)

thank you.

fabio.
Re: Choice append
country flaguser name
United Kingdom
2007-08-24 03:47:01
Hi Fabio

Fabio Petrucci wrote:
> Is it possible to enable the overloaded method 
> 'ControlWithItems#append' to be able to provide user
data?

Yes, there's supposed to be versions of insert/append that
allow you to 
set the client data at the same time, but for some reason
they were 
disabled.

I've committed a patch to enable those for the next
release.

Thanks for the report
alex
_______________________________________________
wxruby-users mailing list
wxruby-usersrubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/wxruby-users

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )