[Gtk-sharp-list] How to clear combobox (easy way if possible)?
andy at brdstudio.net
Sun Dec 6 09:57:37 EST 2009
Typically if I want to have a empty option I add it into the list of
options and the set that iter as a way to clear it. Sometimes that means
doing a Model.Foreach function and returning the iter for the item the
is the empty value.
SpoodyGoon <mailto:andy at brdstudo.net>
On 12/6/2009 9:07 AM, macias wrote:
> I populate combobox items at runtime using AppendText method. I also would
> like to to clear combobox (remove all entries added previously). However I
> cannot find anything appropriate. I also cannot find out how many entries
> there are -- if I could I would use RemoveText method (currently I simply
> run for loop with such big limit that I know in advance there won't be so
> many items, I know, very ugly workaround and buggy).
> I found relevant post here:
> (search for combobox section), however I don't have such method as Clear.
> Another post here:
> but Model also does not have such method as Clear.
> So, again -- how to clear combobox? Superficially it should easy task.
> Thank you in advance for help.
> (MonoDevelop 2.2 beta 2, openSUSE 11.1)
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.426 / Virus Database: 270.14.96/2548 - Release Date: 12/06/09 07:30:00
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gtk-sharp-list