#include <WScom.h>
#include <numfield.h>
#include <WSCbase.h>
//----------------------------------------------------------
//Function for the event procedure
//----------------------------------------------------------
#include <WSCvifield.h>
#include <WSCvarrow.h>

void numfield::resizeep(WSCbase* object){
  numfield* base = (numfield*)object->getUserData(WS_BASE_CLASS);
  WSCushort w = base->getProperty(WSNwidth);
  WSCushort h = base->getProperty(WSNheight);
  WSCushort st = base->getProperty(WSNshadowThickness);
  long item_height = h - st*2;
  if (item_height < 1){
    item_height = 1;
  }
  base->numvarr_001->setProperty(WSNheight,item_height);
  base->numvarr_001->setProperty(WSNwidth,item_height);
  base->numvarr_001->setProperty(WSNx,w - item_height - st);
  base->numvarr_003->setProperty(WSNheight,item_height);
  base->numvarr_003->setProperty(WSNwidth,item_height);
  base->numvarr_003->setProperty(WSNx,w - item_height*2 - st);

  base->numvifi_002->setProperty(WSNheight,item_height);
  base->numvifi_002->setProperty(WSNwidth,w - st*2 - item_height*2);
}
