#include <WScom.h>
#include <WSCfunctionList.h>
#include <WSCbase.h>
//----------------------------------------------------------
//Function for the event procedure
//----------------------------------------------------------
#include <WSClist.h>
extern WSClist* newlist_001;
void btnep1(WSCbase* object){
static int count = 1;
  WSCstring str;
  str << "item" << count;
  newlist_001->addItem(str);

  //icon sample.. 
  if (count % 2 == 0){
    //Use specified icon instead of WSNiconPixmap property.
    //Get label from list, -1 is last one...
    WSCbase* lb = newlist_001->getLabel(-1);
    lb->setProperty(WSNlabelPixmap,"$(WSDIR)/sys/pixmaps/bi16.xpm");
  }
  count++;

}
static WSCfunctionRegister  op("btnep1",(void*)btnep1);
