本文整理汇总了C#中System.Windows.Forms.ColumnWidthChangingEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ColumnWidthChangingEventArgs类的具体用法?C# ColumnWidthChangingEventArgs怎么用?C# ColumnWidthChangingEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ColumnWidthChangingEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了ColumnWidthChangingEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnColumnWidthChanging
protected virtual void OnColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
if ( e.ColumnIndex != ColumnIndex ) return;
e.Cancel = true;
e.NewWidth = ListView.Columns[e.ColumnIndex].Width;
}
示例2: lv_cancelResize
private void lv_cancelResize(object sender, ColumnWidthChangingEventArgs e)
{
if (e.ColumnIndex == 1)
{
e.Cancel = true;
e.NewWidth = 0;
}
}
示例3: listView_ColumnWidthChanging
private void listView_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
if (TotalColWidth > ClientSize.Width)
{
e.Cancel = true;
e.NewWidth = ClientSize.Width - (TotalColWidth - Columns[e.ColumnIndex].Width);
}
treeView.Refresh();
}
示例4: OnColumnWidthChanging
void OnColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
// Don't allow the user to display the first column (item name).
if (e.ColumnIndex == columnIndex)
{
e.Cancel = true;
e.NewWidth = 0;
}
}
示例5: OnColumnWidthChanging
protected override void OnColumnWidthChanging(ColumnWidthChangingEventArgs e)
{
if (!AllowChangeHeaderWidth)
{
e.Cancel = true;
e.NewWidth = this.Columns[e.ColumnIndex].Width;
}
base.OnColumnWidthChanging(e);
}
示例6: Current_List_ColumnWidthChanging
private void Current_List_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
if (e.ColumnIndex == lockColumnIndex)
{
//Keep the width not changed.
e.NewWidth = this.Current_List.Columns[e.ColumnIndex].Width;
//Cancel the event.
e.Cancel = true;
}
}
示例7: listView1_ColumnWidthChanging
private void listView1_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
this.DatatreeView.Focus();
this.DatatreeView.Invalidate();
}
示例8: LV_Entries_ColumnWidthChanging
/// <summary>
/// Prevent user from changing column widths
/// </summary>
private void LV_Entries_ColumnWidthChanging(
object sender, ColumnWidthChangingEventArgs e)
{
e.Cancel = true;
e.NewWidth = lvManga.Columns[e.ColumnIndex].Width;
}
示例9: listRestorePoint_ColumnWidthChanging
/// <summary>
/// listRestorePoint ColumnWidthChanging event handler.
/// Sets the [0] column width to 0.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void listRestorePoint_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
if (e.ColumnIndex == 0)
{
e.NewWidth = 0;
e.Cancel = true;
}
}
示例10: InventoryList_ColumnWidthChanging
private void InventoryList_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
if (e.ColumnIndex == 0)
{
e.NewWidth = this.InventoryList.Columns[0].Width;
e.Cancel = true;
}
}
示例11: OnColumnWidthChanging
protected virtual void OnColumnWidthChanging (ColumnWidthChangingEventArgs e)
{
ColumnWidthChangingEventHandler cwceh = (ColumnWidthChangingEventHandler) (Events[ColumnWidthChangingEvent]);
if (cwceh != null)
cwceh (this, e);
}
示例12: lvTaskList_ColumnWidthChanging
private void lvTaskList_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
if (e.NewWidth < MIN_WIDTH)
{
e.Cancel = true;
e.NewWidth = lvTaskList.Columns[e.ColumnIndex].Width;
}
}
示例13: lstvList_ColumnWidthChanging
//-------------------------------------------------------------------------------
//
private void lstvList_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
if (e.ColumnIndex == 0) { // 画像部分は動かせないようにする
e.NewWidth = 52;
e.Cancel = true;
}
}
示例14: ltvProdutos_ColumnWidthChanging
private void ltvProdutos_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
=> MyListView.ColumnWidthChanging(e, ltvProdutos);
示例15: OnColWidthChanging
//拖动Head的时候,处理需要隐藏的列。
void OnColWidthChanging ( object sender , ColumnWidthChangingEventArgs e )
{
foreach ( int nCol in _lstColHide )
{
if (e.ColumnIndex == nCol && e.NewWidth > 0)
{
e.NewWidth = 0;
e.Cancel = true;
}
}
}