2010/6/14 Zhimin Song <[email protected]>:
> hi, Dushan:
>>
>> comboBox->addItems("Item One;Item Two;Item Three");
>
> I think it is easier, but not so general, especially for the seperator(; or
> others?), I think if needed, we can impl our own combo box derived from
> WComboBox.
>

Or write a utility function to do so, as in the pseudocode below:

void quickFill(WComboBox *b, WString &data)
{
  vector<WString> v = split(data, ';');
  for (i in v) b->add(i);
}

Regards,
Wim.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to