Επεξεργασία

Κοινή χρήση μέσω


TableCell.HorizontalAlign Property

Definition

Gets or sets the horizontal alignment of the contents in the cell.

public:
 virtual property System::Web::UI::WebControls::HorizontalAlign HorizontalAlign { System::Web::UI::WebControls::HorizontalAlign get(); void set(System::Web::UI::WebControls::HorizontalAlign value); };
[System.ComponentModel.Bindable(true)]
public virtual System.Web.UI.WebControls.HorizontalAlign HorizontalAlign { get; set; }
public virtual System.Web.UI.WebControls.HorizontalAlign HorizontalAlign { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.HorizontalAlign : System.Web.UI.WebControls.HorizontalAlign with get, set
member this.HorizontalAlign : System.Web.UI.WebControls.HorizontalAlign with get, set
Public Overridable Property HorizontalAlign As HorizontalAlign

Property Value

One of the HorizontalAlign enumeration values. The default is NotSet.

Attributes

Examples

The following code example demonstrates how to declaratively specify the HorizontalAlign property of a TableCell control. In particular, note how the cell in the last row is left justified. For a complete, working code example, see the TableHeaderCell class overview topic.

<asp:TableCell AssociatedHeaderCellID="Column1Header,Column2Header,Column3Header"  
ColumnSpan="3"  
HorizontalAlign="Left">(2,0)  
</asp:TableCell>  
<asp:TableCell AssociatedHeaderCellID="Column1Header,Column2Header,Column3Header"  
ColumnSpan="3"  
HorizontalAlign="Left">(2,0)  
</asp:TableCell>  

Remarks

Use the HorizontalAlign property to specify the horizontal alignment of the contents of the cell. The possible values for use are specified in the HorizontalAlign enumeration.

Applies to

See also