瀏覽代碼

2002-01-26 Gaurav Vaish <[email protected]>

* TableItemStyle.cs, Panel.cs   -- Completed. :))

* ChangeLog, TODO   -- Updated

 Now I'd try to go for another build including these files. Hope I succeed soon.

svn path=/trunk/mcs/; revision=2165
Gaurav Vaish 24 年之前
父節點
當前提交
91ffc8cbed

+ 172 - 154
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog

@@ -1,154 +1,172 @@
-2002-01-07      Gaurav Vaish <[email protected]>
-
-	* CheckBoxList.cs             - Completed
-	* ButtonColumn.cs             - Completed
-	* Button.cs                   - Completed
-
-2001-12-28      Gaurav Vaish <[email protected]>
-
-	* HyperLink.cs                - Completed
-	* Image.cs                    - Completed
-	* ImageButton.cs              - Completed
-	* Label.cs                    - Completed
-	* LabelControlBuilder.cs      - Completed
-	* LinkButton.cs               - Completed
-	* LinkButtonControlBuilder.cs - Completed
-	* Literal.cs                  - Completed
-	* LieteralControlBuilder.cs   - Completed
-	* FontUnit.cs                 - Completed
-
-
-2001-12-27      Gaurav Vaish <[email protected]>
-
-	* Calendar.cs                 - Completed the functions of Render*,
-	                                ViewStates (Track/View/Save),
-	                                RaisePostBackEvent.
-	                                Left: RenderAllDays (partially)
-
-2001-12-21      Gaurav Vaish <[email protected]>
-
-	* Calendar.cs                 - Added some more functions
-	* Style.cs                    - Completed
-	* ListItem.cs                 - Completed
-	* ListItemCollection.cs       - Completed
-
-  Made the first successful build of System.Web.dll that included System.Web.UI.WebControls!
-
-2001-12-20	Gaurav Vaish <[email protected]>
-
-	FontInfo.cs                 - Complete revamp. Completed
-
-2001-12-19	Gaurav Vaish <[email protected]>
-
-	ListItemCollection.cs       - Completed
-	ListItem.cs                 - Initial Implementation
-	Style.cs                    - Initial Implementation
-
-  Right now I am in a total mood to do a successful build. Creating so many classes, completing classes in System.Web System.Web.UI namespaces.
-
-2001-12-18	Gaurav Vaish <[email protected]>
-
-	TODO                        - Properly added
-	CheckBox.cs                 - Completed
-	BaseDataList.cs             - Completed
-	DayRenderEventArgs.cs       - Completed
-	RepeaterItem.cs             - Initial implementation
-
-2001-12-17	Gaurav Vaish <[email protected]>
-
-	BaseCompareValidator.cs     - Completed
-	AdRotator.cs                - Completed
-
-2001-12-15	Gaurav Vaish <[email protected]>
-
-	CommandEventArgs.cs         - Completed
-	DataGridCommandEventArgs.cs - Completed
-	RepeaterCommandEventArgs.cs - Completed
-	DataListCommandEventArgs.cs - Completed
-	CompareValidator.cs         - Partial Implementation
-
-2001-12-02	Gaurav Vaish <[email protected]>
-
-	CheckBoxList.cs            - Partial Implementation.
-                                     All except "Render"
-
-2001-12-01	Gaurav Vaish <[email protected]>
-
-	ListControl.cs             - Completed
-
-2001-11-30	Gaurav Vaish <[email protected]>
-
-	CheckBox.cs                - Completed
-	ListControl.cs             - Initial Implementation
-	CheckBoxList.cs            - Started with it, but first needed
-                                     ListControl. Left it.
-
-2001-11-29	Gaurav Vaish <[email protected]>
-
-	CalendarDay.cs             - Making a note that this
-                                     has been implemented
-	Calendar.cs                - Making a note that have made some changes.
-                                     Unimplmented functions throw
-                                     NotImplementedException
-	CheckBox.cs                - Can now "Render" and "LoadPostData"
-
-
-2001-11-08	Gaurav Vaish <[email protected]>
-	WebControl.cs              - Total Revamp, Partial Implementation
-	AdRotator.cs               - Able to load files
-	AdCreatedEventArgs.cs      - Implemented
-
-2001-11-05	Gaurav Vaish <[email protected]>
-	Calendar.cs                - Initial Implementation
-	ButtonColumn.cs            - Initial Implementation
-	Button.cs                  - Initial Implementation
-	BoundColumn.cs             - Initial Implementation
-	BaseCompareValidator.cs    - Minor Changes
-	DataList.cs, BaseValidator.cs, BaseDataList.cs
-                                   - Added more functions, other changes
-	
-2001-10-28	Gaurav Vaish <[email protected]>
-	WebControl.cs              - Initial Implementation
-	DataList.cs                - Initial Implementation
-	BaseValidator.cs           - Initial Implementation
-	BaseDataList.cs            - Initial Implementation
-
-2001-10-27	Gaurav Vaish <[email protected]>
-
-	AdCreatedEventArgs.cs      - Initial Implementation
-	AdCratedEventHandler.cs    - Implemented
-	AdRotator.cs               - Initial Implementation
-	BorderStyle.cs             - Implemented
-	ButtonColumnStyle.cs       - Implemented
-	CalendarSelectionMode.cs   - Implemented
-	DayNameFormat.cs           - Implemented
-	FirstDayOfWeek             - Implemented
-	FontInfo.cs                - Partial Implementation
-	FontSize.cs                - Implemented
-	GridLines.cs               - Implemented
-	HorizontalAlign.cs         - Implemented
-	HyperLink.cs               - Initial Implementation
-	ImageAlign.cs              - Implemented
-	IRepeatInfoUser.cs         - Implemented
-	ListItemType.cs            - Implemented
-	ListSelectionMode.cs       - Implemented
-	NextPrevFormat.cs          - Implemented
-	PagerMode.cs               - Implemented
-	PagerPosition.cs           - Implemented
-        RepeatDirection.cs         - Implemented
-	RepeatLayout.cs            - Implemented
-	TextAlign.cs               - Implemented
-	TextBoxMode.cs             - Implemented
-	TitleFormat.cs             - Implemented
-	UnitType.cs                - Implemented
-	ValidationCompareOperator.cs
-                                   - Implemented
-	ValidationDataType.cs      - Implemented
-	ValidationSummaryDisplayMode.cs
-                                   - Implemented
-	ValidatorDisplay.cs        - Implemented
-	VerticalAlign.cs           - Implemented
-
-
-
-// File Created 2001:11:13
+2002-01-25      Gaurav Vaish <[email protected]>
+
+	* Panel.cs                    - Completed
+	* TableItemStyle.cs           - Completed
+
+2002-01-18      Gaurav Vaish <[email protected]>
+
+	* TableCellCollection.cs      - Completed
+	* TableRowCollection.cs       - Completed
+	* TableHeaderCell.cs          - Completed
+	* TableRow.cs                 - Completed
+
+2002-01-09      Gaurav Vaish <[email protected]>
+
+	* TableCellControlBuilder.cs  - Completed
+	* Table.cs                    - Completed
+	* TableCell.cs                - Completed
+
+2002-01-07      Gaurav Vaish <[email protected]>
+
+	* CheckBoxList.cs             - Completed
+	* ButtonColumn.cs             - Completed
+	* Button.cs                   - Completed
+
+2001-12-28      Gaurav Vaish <[email protected]>
+
+	* HyperLink.cs                - Completed
+	* Image.cs                    - Completed
+	* ImageButton.cs              - Completed
+	* Label.cs                    - Completed
+	* LabelControlBuilder.cs      - Completed
+	* LinkButton.cs               - Completed
+	* LinkButtonControlBuilder.cs - Completed
+	* Literal.cs                  - Completed
+	* LieteralControlBuilder.cs   - Completed
+	* FontUnit.cs                 - Completed
+
+
+2001-12-27      Gaurav Vaish <[email protected]>
+
+	* Calendar.cs                 - Completed the functions of Render*,
+	                                ViewStates (Track/View/Save),
+	                                RaisePostBackEvent.
+	                                Left: RenderAllDays (partially)
+
+2001-12-21      Gaurav Vaish <[email protected]>
+
+	* Calendar.cs                 - Added some more functions
+	* Style.cs                    - Completed
+	* ListItem.cs                 - Completed
+	* ListItemCollection.cs       - Completed
+
+  Made the first successful build of System.Web.dll that included System.Web.UI.WebControls!
+
+2001-12-20	Gaurav Vaish <[email protected]>
+
+	FontInfo.cs                 - Complete revamp. Completed
+
+2001-12-19	Gaurav Vaish <[email protected]>
+
+	ListItemCollection.cs       - Completed
+	ListItem.cs                 - Initial Implementation
+	Style.cs                    - Initial Implementation
+
+  Right now I am in a total mood to do a successful build. Creating so many classes, completing classes in System.Web System.Web.UI namespaces.
+
+2001-12-18	Gaurav Vaish <[email protected]>
+
+	TODO                        - Properly added
+	CheckBox.cs                 - Completed
+	BaseDataList.cs             - Completed
+	DayRenderEventArgs.cs       - Completed
+	RepeaterItem.cs             - Initial implementation
+
+2001-12-17	Gaurav Vaish <[email protected]>
+
+	BaseCompareValidator.cs     - Completed
+	AdRotator.cs                - Completed
+
+2001-12-15	Gaurav Vaish <[email protected]>
+
+	CommandEventArgs.cs         - Completed
+	DataGridCommandEventArgs.cs - Completed
+	RepeaterCommandEventArgs.cs - Completed
+	DataListCommandEventArgs.cs - Completed
+	CompareValidator.cs         - Partial Implementation
+
+2001-12-02	Gaurav Vaish <[email protected]>
+
+	CheckBoxList.cs            - Partial Implementation.
+                                     All except "Render"
+
+2001-12-01	Gaurav Vaish <[email protected]>
+
+	ListControl.cs             - Completed
+
+2001-11-30	Gaurav Vaish <[email protected]>
+
+	CheckBox.cs                - Completed
+	ListControl.cs             - Initial Implementation
+	CheckBoxList.cs            - Started with it, but first needed
+                                     ListControl. Left it.
+
+2001-11-29	Gaurav Vaish <[email protected]>
+
+	CalendarDay.cs             - Making a note that this
+                                     has been implemented
+	Calendar.cs                - Making a note that have made some changes.
+                                     Unimplmented functions throw
+                                     NotImplementedException
+	CheckBox.cs                - Can now "Render" and "LoadPostData"
+
+
+2001-11-08	Gaurav Vaish <[email protected]>
+	WebControl.cs              - Total Revamp, Partial Implementation
+	AdRotator.cs               - Able to load files
+	AdCreatedEventArgs.cs      - Implemented
+
+2001-11-05	Gaurav Vaish <[email protected]>
+	Calendar.cs                - Initial Implementation
+	ButtonColumn.cs            - Initial Implementation
+	Button.cs                  - Initial Implementation
+	BoundColumn.cs             - Initial Implementation
+	BaseCompareValidator.cs    - Minor Changes
+	DataList.cs, BaseValidator.cs, BaseDataList.cs
+                                   - Added more functions, other changes
+	
+2001-10-28	Gaurav Vaish <[email protected]>
+	WebControl.cs              - Initial Implementation
+	DataList.cs                - Initial Implementation
+	BaseValidator.cs           - Initial Implementation
+	BaseDataList.cs            - Initial Implementation
+
+2001-10-27	Gaurav Vaish <[email protected]>
+
+	AdCreatedEventArgs.cs      - Initial Implementation
+	AdCratedEventHandler.cs    - Implemented
+	AdRotator.cs               - Initial Implementation
+	BorderStyle.cs             - Implemented
+	ButtonColumnStyle.cs       - Implemented
+	CalendarSelectionMode.cs   - Implemented
+	DayNameFormat.cs           - Implemented
+	FirstDayOfWeek             - Implemented
+	FontInfo.cs                - Partial Implementation
+	FontSize.cs                - Implemented
+	GridLines.cs               - Implemented
+	HorizontalAlign.cs         - Implemented
+	HyperLink.cs               - Initial Implementation
+	ImageAlign.cs              - Implemented
+	IRepeatInfoUser.cs         - Implemented
+	ListItemType.cs            - Implemented
+	ListSelectionMode.cs       - Implemented
+	NextPrevFormat.cs          - Implemented
+	PagerMode.cs               - Implemented
+	PagerPosition.cs           - Implemented
+        RepeatDirection.cs         - Implemented
+	RepeatLayout.cs            - Implemented
+	TextAlign.cs               - Implemented
+	TextBoxMode.cs             - Implemented
+	TitleFormat.cs             - Implemented
+	UnitType.cs                - Implemented
+	ValidationCompareOperator.cs
+                                   - Implemented
+	ValidationDataType.cs      - Implemented
+	ValidationSummaryDisplayMode.cs
+                                   - Implemented
+	ValidatorDisplay.cs        - Implemented
+	VerticalAlign.cs           - Implemented
+
+
+
+// File Created 2001:11:13

+ 93 - 0
mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs

@@ -0,0 +1,93 @@
+/**
+ * Namespace: System.Web.UI.WebControls
+ * Class:     Panel
+ * 
+ * Author:  Gaurav Vaish
+ * Maintainer: [email protected]
+ * Contact: <[email protected]>, <[email protected]>
+ * Implementation: yes
+ * Status:  100%
+ * 
+ * (C) Gaurav Vaish (2002)
+ */
+
+using System;
+using System.ComponentModel;
+using System.Web;
+using System.Web.UI;
+
+namespace System.Web.UI.WebControls
+{
+	public class Panel: WebControl
+	{
+		public Panel(): base(HtmlTextWriterTag.Div)
+		{
+		}
+		
+		public virtual string BackImageUrl
+		{
+			get
+			{
+				object o = ViewState["BackImageUrl"];
+				if(o != null)
+					return (string)o;
+				return String.Empty;
+			}
+			set
+			{
+				ViewState["BackImageUrl"] = value;
+			}
+		}
+		
+		public virtual HorizontalAlign HorizontalAlign
+		{
+			get
+			{
+				object o = ViewState["HorizontalAlign"];
+				if(o != null)
+					return (HorizontalAlign)o;
+				return HorizontalAlign.NotSet;
+			}
+			set
+			{
+				if(!Enum.IsDefined(typeof(HorizontalAlign), value))
+				{
+					throw new ArgumentException();
+				}
+				ViewState["HorizontalAlign"] = value;
+			}
+		}
+		
+		public virtual bool Wrap
+		{
+			get
+			{
+				object o = ViewState["Wrap"];
+				if(o != null)
+					return (bool)o;
+				return true;
+			}
+			set
+			{
+				ViewState["Wrap"] = value;
+			}
+		}
+		
+		protected override void AddAttributesToRender(HtmlTextWriter writer)
+		{
+			AddAttributesToRender(writer);
+			if(BackImageUrl.Length > 0)
+			{
+				writer.AddStyleAttribute(HtmlTextWriterStyle.BackgroundImage, "url(" + ResolveUrl(BackImageUrl) + ")");
+			}
+			if(HorizontalAlign != HorizontalAlign.NotSet)
+			{
+				writer.AddAttribute(HtmlTextWriterAttribute.Align, TypeDescriptor.GetConverter(typeof(HorizontalAlign)).ConvertToString(HorizontalAlign));
+			}
+			if(Wrap)
+			{
+				writer.AddAttribute(HtmlTextWriterAttribute.NoWrap, "nowrap");
+			}
+		}
+	}
+}

+ 125 - 125
mcs/class/System.Web/System.Web.UI.WebControls/TODO

@@ -1,125 +1,125 @@
-All Classes, Interfaces, Structures, Delegates and Enumerations
-
-
-**: Attributes may have to be supplied to the classes. Some of the
-    attributes include DefaultPropertyAttribute, ToolboxItemAttribute,
-    ParseChildrenAttribute (to be added to System.Web.UI) etc. Currently, I
-    have not taken care of these aspects. They are to be handled later on.
-
-<legends>
-*: Completed
-&: Work in progress. See <item-name>.cs file for maintainer's name
-</legends>
-
-* AdCreatedEventArgs
-* AdRotator
-* BaseCompareValidator
-* BaseDataList
-& BaseValidator
-& BoundColumn
-* Button
-* ButtonColumn
-& Calendar
-* CalendarDay
-* CheckBox
-* CheckBoxList
-* CommandEventArgs
-& CompareValidator
-CustomValidator
-DataGrid
-DataGridColumn
-DataGridColumnCollection
-* DataGridCommandEventArgs
-DataGridItem
-DataGridItemCollection
-* DataGridItemEventArgs
-* DataGridPageChangedEventArgs
-DataGridPagerStyle
-* DataGridShortCommandEventArgs
-DataKeyCollection
-& DataList
-* DataListCommandEventArgs
-DataListItem
-DataListItemCollecton
-* DataListItemEventArgs
-* DayRenderEventArgs
-DropDownList
-EditCommandColumn
-* FontInfo
-FontNamesConverter
-FontUnitConverter
-* HyperLink
-* HyperLinkColumn
-* HyperLinkControlBuilder
-* Image
-* ImageButton
-* Label
-* LabelControlBuilder
-* LinkButton
-* LinkButtonControlBuilder
-ListBox
-* ListControl
-* ListItem
-* ListItemCollection
-ListItemControlBuilder
-* Literal
-* LiteralControlBuilder
-* MonthChangedEventArgs
-PagedDataSource
-Panel
-PlaceHolder
-PlaceHolderControlBuilder
-RadioButton
-RadioButtonList
-RangeValidator
-RegularExpressionValidator
-Repeater
-* RepeaterCommandEventArgs
-& RepeaterItem
-RepeaterItemCollection
-* RepeaterItemEventArgs
-RepeatInfo
-RequiredFieldValidator
-SelectedDatesCollection
-* ServerValidateEventArgs
-* Style
-* Table
-* TableCell
-* TableCellCollection
-* TableCellControlBuilder
-TableHeaderCell
-TableItemStyle
-* TableRow
-* TableRowCollection
-TableStyle
-TargetConverter
-TemplateColumn
-TextBox
-TextBoxControlBuilder
-UnitConverter
-ValidatedControlConverter
-ValidationSummary
-WebColorConverter
-& WebControl
-Xml
-
-* IRepeatInfoUser
-
-* FontUnit
-* Unit
-
-* AdCreatedEventHandler
-* CommandEventHandler
-* DataGridCommandEventHandler
-* DataGridItemEventHandler
-* DataGridPageChangedEventHandler
-* DataGridSortCommandEventHandler
-* DataListCommandEventHandler
-* DataListItemEventHandler
-* DayRenderEventHandler
-* MonthChangedEventHandler
-* RepeaterCommandEventHandler
-* RepeaterItemEventHandler
-* ServerValidateEventHandler
-
-* <Enumerations>
+All Classes, Interfaces, Structures, Delegates and Enumerations
+
+
+**: Attributes may have to be supplied to the classes. Some of the
+    attributes include DefaultPropertyAttribute, ToolboxItemAttribute,
+    ParseChildrenAttribute (to be added to System.Web.UI) etc. Currently, I
+    have not taken care of these aspects. They are to be handled later on.
+
+<legends>
+*: Completed
+&: Work in progress. See <item-name>.cs file for maintainer's name
+</legends>
+
+* AdCreatedEventArgs
+* AdRotator
+* BaseCompareValidator
+* BaseDataList
+& BaseValidator
+& BoundColumn
+* Button
+* ButtonColumn
+& Calendar
+* CalendarDay
+* CheckBox
+* CheckBoxList
+* CommandEventArgs
+& CompareValidator
+CustomValidator
+DataGrid
+DataGridColumn
+DataGridColumnCollection
+* DataGridCommandEventArgs
+DataGridItem
+DataGridItemCollection
+* DataGridItemEventArgs
+* DataGridPageChangedEventArgs
+DataGridPagerStyle
+* DataGridShortCommandEventArgs
+DataKeyCollection
+& DataList
+* DataListCommandEventArgs
+DataListItem
+DataListItemCollecton
+* DataListItemEventArgs
+* DayRenderEventArgs
+DropDownList
+EditCommandColumn
+* FontInfo
+FontNamesConverter
+FontUnitConverter
+* HyperLink
+* HyperLinkColumn
+* HyperLinkControlBuilder
+* Image
+* ImageButton
+* Label
+* LabelControlBuilder
+* LinkButton
+* LinkButtonControlBuilder
+ListBox
+* ListControl
+* ListItem
+* ListItemCollection
+ListItemControlBuilder
+* Literal
+* LiteralControlBuilder
+* MonthChangedEventArgs
+PagedDataSource
+* Panel
+PlaceHolder
+PlaceHolderControlBuilder
+RadioButton
+RadioButtonList
+RangeValidator
+RegularExpressionValidator
+Repeater
+* RepeaterCommandEventArgs
+& RepeaterItem
+RepeaterItemCollection
+* RepeaterItemEventArgs
+RepeatInfo
+RequiredFieldValidator
+SelectedDatesCollection
+* ServerValidateEventArgs
+* Style
+* Table
+* TableCell
+* TableCellCollection
+* TableCellControlBuilder
+* TableHeaderCell
+& TableItemStyle
+* TableRow
+* TableRowCollection
+TableStyle
+TargetConverter
+TemplateColumn
+TextBox
+TextBoxControlBuilder
+UnitConverter
+ValidatedControlConverter
+ValidationSummary
+WebColorConverter
+& WebControl
+Xml
+
+* IRepeatInfoUser
+
+* FontUnit
+* Unit
+
+* AdCreatedEventHandler
+* CommandEventHandler
+* DataGridCommandEventHandler
+* DataGridItemEventHandler
+* DataGridPageChangedEventHandler
+* DataGridSortCommandEventHandler
+* DataListCommandEventHandler
+* DataListItemEventHandler
+* DayRenderEventHandler
+* MonthChangedEventHandler
+* RepeaterCommandEventHandler
+* RepeaterItemEventHandler
+* ServerValidateEventHandler
+
+* <Enumerations>

+ 156 - 0
mcs/class/System.Web/System.Web.UI.WebControls/TableItemStyle.cs

@@ -0,0 +1,156 @@
+/**
+ * Namespace: System.Web.UI.WebControls
+ * Class:     TableItemStyle
+ *
+ * Author:  Gaurav Vaish
+ * Maintainer: [email protected]
+ * Contact: <[email protected]>, <[email protected]>
+ * Implementation: yes
+ * Status:  100%
+ *
+ * (C) Gaurav Vaish (2002)
+ */
+
+using System;
+using System.Web;
+using System.Web.UI;
+
+namespace System.Web.UI.WebControls
+{
+	public class TableItemStyle: Style
+	{
+		private static int H_ALIGN = (0x01 << 16);
+		private static int V_ALIGN = (0x01 << 17);
+		private static int WRAP    = (0x01 << 18);
+		
+		public TableItemStyle(): base()
+		{
+		}
+		
+		public TableItemStyle(StateBag bag): base(bag)
+		{
+		}
+		
+		public virtual HorizontalAlign HorizontalAlign
+		{
+			get
+			{
+				if(IsSet(H_ALIGN))
+					return (HorizontalAlign)ViewState["HorizontalAlign"];
+				return HorizontalAlign.NotSet;
+			}
+			set
+			{
+				if(!Enum.IsDefined(typeof(HorizontalAlign), value))
+				{
+					throw new ArgumentException();
+				}
+				ViewState["HorizontalAlign"] = value;
+				Set(H_ALIGN);
+			}
+		}
+		
+		public virtual VerticalAlign VerticalAlign
+		{
+			get
+			{
+				if(IsSet(V_ALIGN))
+					return (VerticalAlign)iewState["VerticalAlign"];
+				return VerticalAlign.NotSet;
+			}
+			set
+			{
+				if(!Enum.IsDefined(typeof(VerticalAlign), value))
+				{
+					throw new ArgumentException();
+				}
+				ViewState["VerticalAlign"] = value;
+				Set(V_ALIGN);
+			}
+		}
+
+		public virtual bool Wrap
+		{
+			get
+			{
+				if(IsSet(WRAP))
+					return (bool)ViewState["Wrap"];
+				return true;
+			}
+			set
+			{
+				ViewState["Wrap"] = value;
+			}
+		}
+		
+		public override void CopyFrom(Style s)
+		{
+			if(s!=null && s is TableItemStyle && !s.IsEmpty)
+			{
+				base.CopyFrom(s);
+				TableItemStyle from = (TableItemStyle)s;
+				if(from.IsSet(H_ALIGN))
+				{
+					HorizontalAlign = from.HorizontalAlign;
+				}
+				if(from.IsSet(V_ALIGN))
+				{
+					VerticalAlign = from.VerticalAlign;
+				}
+				if(from.IsSet(WRAP))
+				{
+					Wrap = from.Wrap;
+				}
+			}
+		}
+		
+		public override void MergeWith(Style s)
+		{
+			if(s!=null && s is TableItemStyle && !s.IsEmpty)
+			{
+				base.MergeWith(s);
+				TableItemStyle with = (TableItemStyle)s;
+				if(from.IsSet(H_ALIGN) && !IsSet(H_ALIGN))
+				{
+					HorizontalAlign = with.HorizontalAlign;
+				}
+				if(from.IsSet(V_ALIGN) && !IsSet(V_ALIGN))
+				{
+					VerticalAlign = with.VerticalAlign;
+				}
+				if(from.IsSet(WRAP) && !IsSet(WRAP))
+				{
+					Wrap = with.Wrap;
+				}
+			}
+		}
+		
+		public override void Reset()
+		{
+			if(IsSet(H_ALIGN))
+				ViewState.Remove("HorizontalAlign");
+			if(IsSet(V_ALIGN))
+				ViewState.Remove("VerticalAlign");
+			if(IsSet(WRAP))
+				ViewState.Remove("Wrap");
+			base.Reset();
+		}
+		
+		protected override void AddAttributesToRender(HtmlTextWriter writer, WebControl owner)
+		{
+			base.AddAttributesToRender(writer, owner);
+			if(!Wrap)
+			{
+				writer.AddAttribute(HtmlTextWriterAttribute.NoWrap, "nowrap");
+			}
+			if(HorizontalAlign != HorizontalAlign.NotSet)
+			{
+				writer.AddAttribute(HtmlTextWriterAttribute.Align, TypeDescriptor.GetConverter(typeof(HorizontalAlign)).ConvertToString(HorizontalAlign));
+			}
+			if(VerticalAlign != VerticalAlign.NotSet)
+			{
+				writer.AddAttribute(HtmlTextWriterAttribute.Valign, TypeDescriptor.GetConverter(typeof(VerticalAlign)).ConvertToString(VerticalAlign));
+			}
+		}
+	}
+}