how to add checkbox to popup menu

how to add check boxes to popup menu?

Attach a method to the element, in which you want to show the popup and write these code.
This is a example by which you can create any checkbox item in popup menu

//create popup menu
	var ppMenu = plugins.window.createPopupMenu();
	
	//create checked checkbox
	var menu1 = ppMenu.addCheckBox('Checked');
	menu1.selected = true;
	
	//create unchecked checkbox
	var menu2 = ppMenu.addCheckBox('UnChecked');
	menu2.selected = false;
	
	//show popup menu
	ppMenu.show(elements[event.getElementName()]);

This is for Servoy 5.1.2 using Windows Plugin.