Sfoglia il codice sorgente

2002-06-18 Gonzalo Paniagua Javier <[email protected]>

	* WebControl.cs:
	(CopyBaseAttributes): copy Attributes and don't throw exception.

svn path=/trunk/mcs/; revision=5329
Gonzalo Paniagua Javier 23 anni fa
parent
commit
14dcbdc7a4

+ 5 - 0
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,8 @@
+2002-06-18  Gonzalo Paniagua Javier <[email protected]>
+
+	* WebControl.cs:
+	(CopyBaseAttributes): copy Attributes and don't throw exception.
+
 2002-06-18  Gonzalo Paniagua Javier <[email protected]>
 
 	* ListBox.cs: mono-stylized.

+ 3 - 3
mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs

@@ -331,10 +331,8 @@ namespace System.Web.UI.WebControls
 			//}
 		}
 
-		[MonoTODO]
 		public void CopyBaseAttributes(WebControl controlSrc)
 		{
-			//TODO: tocopy
 			/*
 			 * AccessKey, Enabled, ToolTip, TabIndex, Attributes
 			*/
@@ -343,7 +341,9 @@ namespace System.Web.UI.WebControls
 			ToolTip    = controlSrc.ToolTip;
 			TabIndex   = controlSrc.TabIndex;
 			attributes = controlSrc.Attributes;
-			throw new NotImplementedException();
+			AttributeCollection otherAtt = controlSrc.Attributes;
+			foreach (string key in controlSrc.Attributes.Keys)
+				Attributes [key] = otherAtt [key];
 		}
 
 		public void MergeStyle(Style s)