Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

listview disable resize columns

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();

        // This line registers the event, soc that the form can "hear" it and call the indicated handling code:
        this.listView1.ColumnWidthChanging += new ColumnWidthChangingEventHandler(listView1_ColumnWidthChanging);
    }

    void listView1_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
    {
        Console.Write("Column Resizing");
        e.NewWidth = this.listView1.Columns[e.ColumnIndex].Width;
        e.Cancel = true;
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# convert utc to est 
Csharp :: unity length of string 
Csharp :: c# null check can be simplified 
Csharp :: C# inline question mark on object 
Csharp :: system.linq.iorderedenumerable`2[system.char,system.char] çözümü 
Csharp :: how to compare 2 date time in asp.net core 3.1 
Csharp :: camera follow player 
Csharp :: gcd c# 
Csharp :: blank background for button wpf 
Csharp :: c# image to byte array 
Csharp :: get web config key value in c# razor view 
Csharp :: ensuresuccessstatuscode exception 
Csharp :: c# ascii to char 
Csharp :: Create gaps / headers between variables in the unity inspector 
Csharp :: get enum int by name 
Csharp :: c# list get element from end 
Csharp :: blazor button onclick parameter 
Csharp :: get logged in user name c# 
Csharp :: c# and 
Csharp :: readonly vs const c# 
Csharp :: delete file from FTP c# 
Csharp :: c# datagridview change column name 
Csharp :: C# convert iformfile to stream 
Csharp :: mvc list to jsonresult 
Csharp :: c# hex to console color 
Csharp :: array.convertall 
Csharp :: c# loop through files in folder 
Csharp :: regular expression for email in c# 
Csharp :: c# shuffle list 
Csharp :: c# create a zip files 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =