Bug 467086

Summary: ListView.ColumnWidthChanged not raised when changing ColumnHeader.Width programmatically.
Product: [Mono] Mono: Class Libraries Reporter: Mario Carrion <mcarrion>
Component: Windows.FormsAssignee: Mono Bugs <mono-bugs>
Status: RESOLVED FIXED QA Contact: Mono Bugs <mono-bugs>
Severity: Normal    
Priority: P5 - None CC: calberto.cortez, gert.driesen
Version: SVN   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 468504    
Attachments: Example.
Proposed patch.

Description Mario Carrion 2009-01-16 21:58:34 UTC
Created attachment 265815 [details]
Example.

1. Compile the attached code
2. Click "Change width" button.
3. You will notice the column width changes, however the event is not raised.
4. No output.

Expected: Output

"Column width changed: 100"

.NET raises the event when changing width, actually, when running the example they raise 3 events (because of the 3 columns), so the I get the following output when running the example (before clicking the button):

"Column width changed: 70"
"Column width changed: 70"
"Column width changed: 70"

however, this is a different bug, I'm guessing the event is raised when adding the columns in the Columns property.
Comment 1 Mario Carrion 2009-01-16 21:59:23 UTC
Created attachment 265816 [details]
Proposed patch.
Comment 2 Carlos Alberto Cortez 2009-02-03 01:09:22 UTC
This looks fine. Please commit. Thanks!
Comment 3 Gert Driesen 2009-02-03 16:08:45 UTC
Can you also add a unit test for this?
Thx!
Comment 4 Mario Carrion 2009-02-03 16:25:11 UTC
(In reply to comment #3)
> Can you also add a unit test for this?
> Thx!

Sure.
Comment 5 Mario Carrion 2009-02-04 17:12:43 UTC
Fixed: r125702
Test: r125703