[Mmclibrary-svn] SF.net SVN: mmclibrary: [6] MMCLib2/PropertyPages
Brought to you by:
imjimmurphy,
kachalkov
From: <tig...@us...> - 2008-06-04 14:38:54
|
Revision: 6 http://mmclibrary.svn.sourceforge.net/mmclibrary/?rev=6&view=rev Author: tigerharry Date: 2008-06-04 07:38:49 -0700 (Wed, 04 Jun 2008) Log Message: ----------- - now propertypage using size of control - added eventhandle for closing PropertyPage when ESC is pressed Modified Paths: -------------- MMCLib2/PropertyPages/PropertyPage.cs MMCLib2/PropertyPages/PropertySheet.cs Modified: MMCLib2/PropertyPages/PropertyPage.cs =================================================================== --- MMCLib2/PropertyPages/PropertyPage.cs 2007-07-30 14:03:43 UTC (rev 5) +++ MMCLib2/PropertyPages/PropertyPage.cs 2008-06-04 14:38:49 UTC (rev 6) @@ -207,7 +207,7 @@ /// <summary> - /// Generate the actual TabPage that will used in the PropertySheet. + /// Generate the actual TabPage that will be used in the PropertySheet. /// We don't keep re-using the same TabPage each time /// the property page is created because it makes the /// updating of the property pages a little difficult. @@ -222,13 +222,13 @@ UserControl ctrl = MainControl; ctrl.Location = new Point(0, 0); - ctrl.Size = Size; - ctrl.TabIndex = 0; + ctrl.Size = Size; + ctrl.TabIndex = 0; // Parent this control to our user control tp.Controls.Add(ctrl); - tp.Size = Size; + tp.Size = Size; tp.Text = Title; return tp; Modified: MMCLib2/PropertyPages/PropertySheet.cs =================================================================== --- MMCLib2/PropertyPages/PropertySheet.cs 2007-07-30 14:03:43 UTC (rev 5) +++ MMCLib2/PropertyPages/PropertySheet.cs 2008-06-04 14:38:49 UTC (rev 6) @@ -165,7 +165,10 @@ //Added by Alexander Kachalkov //This call is required by the Windows Form Designer. - InitializeComponent(); + InitializeComponent(); + + //Added by Harald Binkle [tigerharry] + this.KeyDown += new KeyEventHandler(PropertySheet_KeyDown); //Added by Alexander Ovchinnikov for close PS after remove node //initialise closeDelegate @@ -173,7 +176,13 @@ { _closeHandle += new OnUserDelegate( ClosePropertySheet ); } - } + } + + //Added by Harald Binkle [tigerharry] to be able to close the property page using ESC button + void PropertySheet_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Escape) FakeClose(); + } /// <summary> /// Prepares the property sheet to be shown and then displays it This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |