back to gui 

wxCloseEvent

generated from ../src/mod_gui/event/close.cpp

This object is passed to a function that is set to an onClose property of a wxFrame or wxDialog. The following example vetoes the close event because the text control was changed.


	frame.onclose = close;

	function close(closeEvent)
	{
	  if ( closeEvent.canVeto )
	  {
		if ( textCtrl.modified )
		{
		  wxMessageBox("Can't close because you didn't save the contents");
		  closeEvent.veto = true;
		}
	  }
	}
  

Constants

Properties

Name Type Description
canVeto read only Boolean Returns true when the close event can be vetoed.
loggingOff read only Boolean Returns true when the user is logging off.
veto Boolean Set this to true when you don't want to close the window.


SourceForge.net Logo Support This Project

Table of Contents

Prototype

wxEvent

Properties

canVeto
loggingOff
veto


Design downloaded from Zeroweb.org: Free website templates, layouts, and tools.