protected virtual void OnColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { if ( e.ColumnIndex != ColumnIndex ) return; e.Cancel = true; e.NewWidth = ListView.Columns[e.ColumnIndex].Width; }
private void lv_cancelResize(object sender, ColumnWidthChangingEventArgs e) { if (e.ColumnIndex == 1) { e.Cancel = true; e.NewWidth = 0; } }
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(); }
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; } }
protected override void OnColumnWidthChanging(ColumnWidthChangingEventArgs e) { if (!AllowChangeHeaderWidth) { e.Cancel = true; e.NewWidth = this.Columns[e.ColumnIndex].Width; } base.OnColumnWidthChanging(e); }
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; } }
private void listView1_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { this.DatatreeView.Focus(); this.DatatreeView.Invalidate(); }
/// <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; }
/// <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; } }
private void InventoryList_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { if (e.ColumnIndex == 0) { e.NewWidth = this.InventoryList.Columns[0].Width; e.Cancel = true; } }
protected virtual void OnColumnWidthChanging (ColumnWidthChangingEventArgs e) { ColumnWidthChangingEventHandler cwceh = (ColumnWidthChangingEventHandler) (Events[ColumnWidthChangingEvent]); if (cwceh != null) cwceh (this, e); }
private void lvTaskList_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { if (e.NewWidth < MIN_WIDTH) { e.Cancel = true; e.NewWidth = lvTaskList.Columns[e.ColumnIndex].Width; } }
//------------------------------------------------------------------------------- // private void lstvList_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { if (e.ColumnIndex == 0) { // 画像部分は動かせないようにする e.NewWidth = 52; e.Cancel = true; } }
private void ltvProdutos_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) => MyListView.ColumnWidthChanging(e, ltvProdutos);
//拖动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; } } }
private void lvFileList_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { try { // Deny resizing hidden columns. Ugly. if (e.ColumnIndex == 2) { e.Cancel = true; e.NewWidth = 0; } } catch (Exception ex) { Base.HandleException(ex); } }
void listView_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { e.NewWidth = ((ListView)sender).Columns[e.ColumnIndex].Width; e.Cancel = true; }
private void listviewname_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { //e.Cancel = true; //e.NewWidth = lbExams.Columns[e.ColumnIndex].Width; }
private void deviceListView_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { //don't allow 0-width (hidden) columns to be resized if (deviceListView.Columns[e.ColumnIndex].Width == 0) { e.Cancel = true; e.NewWidth = 0; } }
void lvBookmarks_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { ApplyColumnWidths(); }
// // 2.0 profile based implementation // bool CanProceedWithResize (ColumnHeader col, int width) { ColumnWidthChangingEventHandler cwceh = (ColumnWidthChangingEventHandler) (Events[ColumnWidthChangingEvent]); if (cwceh == null) return true; ColumnWidthChangingEventArgs changing = new ColumnWidthChangingEventArgs (col.Index, width); cwceh (this, changing); return !changing.Cancel; }
private void lvThongTin_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { if (e.ColumnIndex == 0) { e.NewWidth = 0; e.Cancel = true; } if (e.ColumnIndex == 1) { e.NewWidth = 0; e.Cancel = true; } lvWidth = 0; for (int i = 0; i < lvThongTin.Columns.Count; i++) { lvWidth += lvThongTin.Columns[i].Width; } centerX = lvThongTin.Columns[lvThongTin.Columns.Count - 1].Width / 2; }
void lvDownloadAddresses_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { e.Cancel = true; if (e.ColumnIndex != colServerUrl.Index) { e.NewWidth = widths[e.ColumnIndex]; } else { int w = 0; foreach (ColumnHeader ch in lvDownloadAddresses.Columns) { if (ch != colServerUrl) { w += widths[ch.Index]; } } w += 5; e.NewWidth = colServerUrl.Width = (lvDownloadAddresses.Width - w - SystemInformation.VerticalScrollBarWidth); } }
private void listView1_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { e.NewWidth = listView1.Columns[e.ColumnIndex].Width; e.Cancel = true; }
/// <summary> /// Handles the <see cref="ListView.ColumnWidthChanging"/> event of the mod list. /// </summary> /// <remarks> /// This resizes the column next to the column being resized to resize as well, /// so that the columns keep the list view filled. /// </remarks> /// <param name="sender">The object that raised the event.</param> /// <param name="e">A <see cref="ColumnWidthChangingEventArgs"/> describing the event arguments.</param> private void clwCategoryView_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { if (m_booResizing) return; ColumnHeader clmThis = clwCategoryView.Columns[e.ColumnIndex]; ColumnHeader clmOther = null; if (e.ColumnIndex == clwCategoryView.Columns.Count - 1) clmOther = clwCategoryView.Columns[e.ColumnIndex - 1]; else clmOther = clwCategoryView.Columns[e.ColumnIndex + 1]; m_booResizing = true; clmOther.Width += (clmThis.Width - e.NewWidth); m_booResizing = false; }
private void lvDaftarUser_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { e.Cancel = true; e.NewWidth = lvDaftarUser.Columns[e.ColumnIndex].Width; }
private void lvThongTin_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { if (e.ColumnIndex == 0) { e.NewWidth = 0; e.Cancel = true; } if (e.ColumnIndex == 1) { e.NewWidth = 0; e.Cancel = true; } }
private void lvTransfers_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { try { if (e.ColumnIndex < 2) { e.Cancel = true; e.NewWidth = 0; } } catch (Exception ex) { Base.HandleException(ex, true); } }
/// <summary> /// When the column widths are changing, resize the space filling columns /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected virtual void HandleColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { if (this.UpdateSpaceFillingColumnsWhenDraggingColumnDivider && !this.GetColumn(e.ColumnIndex).FillsFreeSpace) { // If the width of a column is increasing, resize any space filling columns allowing the extra // space that the new column width is going to consume int oldWidth = this.GetColumn(e.ColumnIndex).Width; if (e.NewWidth > oldWidth) this.ResizeFreeSpaceFillingColumns(this.ClientSize.Width - (e.NewWidth - oldWidth)); else this.ResizeFreeSpaceFillingColumns(); } }
private void PlayersOnlineListView_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) { e.Cancel = true; e.NewWidth = PlayersOnlineListView.Columns[e.ColumnIndex].Width; }