Revision: 5
http://mmclibrary.svn.sourceforge.net/mmclibrary/?rev=5&view=rev
Author: tigerharry
Date: 2007-07-30 07:03:43 -0700 (Mon, 30 Jul 2007)
Log Message:
-----------
- added OK as default ok and default cancel if no cancel button there
Modified Paths:
--------------
MMCLib2/PropertyPages/PropertySheet.cs
Modified: MMCLib2/PropertyPages/PropertySheet.cs
===================================================================
--- MMCLib2/PropertyPages/PropertySheet.cs 2007-03-15 12:28:35 UTC (rev 4)
+++ MMCLib2/PropertyPages/PropertySheet.cs 2007-07-30 14:03:43 UTC (rev 5)
@@ -182,7 +182,7 @@
{
Controls.Clear();
-
+
// Figure out how big to make the tab control
// by sizing to the largest UserControl
@@ -224,8 +224,8 @@
// things, which makes m_tc.ItemSize.Height valid.
IntPtr handle = _tc.Handle;
- nHeight += _tc.Location.Y + _tc.ItemSize.Height;
-
+ nHeight += _tc.Location.Y + _tc.ItemSize.Height;
+ nWidth += _tc.Location.X + 8;
// calculate the tabcontrol height
_tc.Size = new System.Drawing.Size(nWidth, nHeight);
nHeight = CalcTabHeight(nHeight);
@@ -283,8 +283,10 @@
// We have a 4 pixel margin on each side of the tab control, and a 5 pixel margin
// between the buttons and the bottom of the page
ClientSize = new System.Drawing.Size(nWidth + 8, nHeight + 5);
- this.AcceptButton = _btnOk;
- this.CancelButton = _btnCancel;
+ this.AcceptButton = _btnOk;
+ if (_btnCancel != null) this.CancelButton = _btnCancel;
+ //[--added if(!=null), else.. by Harald Binkle (tigerharry)
+ else this.CancelButton = _btnOk;
//Added by Alexander Kachalkov
base.Closing += new CancelEventHandler(OnCloseClick);
@@ -463,8 +465,8 @@
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Name = SnapinBase.Translate("Properties");
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- //this.TopMost = true;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ //this.TopMost = true;
}
@@ -513,7 +515,7 @@
/// Validation Delegate
/// </summary>
public delegate bool CheckValidation();
- #endregion
+ #endregion Validate end
#region PropertySheetTabControl
/// <summary>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|