Source/AdvTree/ColumnWidth.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.ComponentModel;
namespace DevComponents.AdvTree
{
/// <summary>
/// Represents the width of the Column. Supports absolute width in Pixels and
/// relative width as percentage of the width of parent control.
/// </summary>
[ToolboxItem(false) ,System.ComponentModel.DesignTimeVisible(false),TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
public class ColumnWidth
{
private int m_Relative=0;
private int m_Absolute=0;
internal event EventHandler WidthChanged;
/// <summary>
/// Creates new instance of the object.
/// </summary>
public ColumnWidth()
{
}
/// <summary>
/// Gets or sets relative width expressed as percentage between 1-100. 0 indicates that
/// absolute width will be used.
/// </summary>
/// <remarks>
/// Relative width is expressed as percentage between 1-100 of the parent controls
/// width. 0 indicates that absolute width will be used. Absolute width always takes
/// priority over relative width. For example value of 30 assigned to this property
/// indicates that width of the column will be 30% of the total client width of the
/// control.
/// </remarks>
[DefaultValue(0),Browsable(true),Description("Gets or sets relative width in percent. Valid values are between 1-100 with 0 indicating that absolute width will be used.")]
public int Relative
{
get {return m_Relative;}
set
{
if(m_Relative!=value)
{
m_Relative=value;
OnSizeChanged();
}
}
}
/// <summary>Gets or sets the absolute width of the column in pixels.</summary>
/// <remarks>
/// Absolute width always takes precedence over the relative width of the
/// column.
/// </remarks>
[DefaultValue(0),Browsable(true),Description("Gets or sets the absolute width of the column in pixels.")]
public int Absolute
{
get {return m_Absolute;}
set
{
if(m_Absolute<0)
后面还有 75 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。