#----------------------------------------------------------
#Function for the event procedure
#----------------------------------------------------------
import mpfc
from newwin000 import *

def resizeep(object):
	#do something...
	width = object.getProperty("width").getUnsignedShort()
	heigth = object.getProperty("height").getUnsignedShort()
	
	width = width - 10
	newform_000.setProperty("width",width)
	newvlab_001.setProperty("width",(width - 10))

	bheight = ((heigth - 60) - 10) / 5
	bwidth = width / 4
	for i in range(21):
		newvbtn[i].setProperty("x",(5 + bwidth*(i / 5)))
		newvbtn[i].setProperty("y",(60 + bheight * (i % 5)))
		newvbtn[i].setProperty("width",bwidth)
		newvbtn[i].setProperty("height", bheight)
	return
mpfc.WSGFfunctionRegister("resizeep",resizeep)
