[Mono-bugs] [Bug 494771] New: Adding LVS_NOCOLUMNHEADER support to ListView descendent does not work under Mono

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Apr 14 12:29:41 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=494771


           Summary: Adding LVS_NOCOLUMNHEADER support to ListView
                    descendent does not work under Mono
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: i586
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: Dominique at SavageSoftware.com.au
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Description of Problem:

I'm creating my own ListView, which inherits 99% of it's functionality from
built in ListView. One thing which standard Win32 API Listview supports is the
ability to hide the Headers in View.Details mode, but the .NET version does not
appear to support this natively. I have tried the following in an attempt to
add this functionality to MyListView, but it is not working under Mono, but
works fine with Microsoft's .NET...

Adding LVS_NOCOLUMNHEADER to the CreateParams style sould help, but it does not
under Mono, but is fine under Microsoft's environment.

Steps to reproduce the problem:

1. Create a ListView descendent 
2. Add the following code....

private const int LVS_NOCOLUMNHEADER = 0x4000;

        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams cp = base.CreateParams;

                if ( !fShowColumnHeaders )
                {
                    // Hide the Column Headers      
                    cp.Style |= LVS_NOCOLUMNHEADER;
                }

                return cp;
            }           
        }

private bool fShowColumnHeaders;
        // Declares the property.
        [       
            Description("Show or hide the column headers")
        ]
        public bool ShowColumnHeaders
        {
            // Sets the method for retrieving the value of your property.
            get
            {
                return fShowColumnHeaders;
            }
            // Sets the method for setting the value of your property.
            set
            {
                if ( fShowColumnHeaders != value )
                {
                    fShowColumnHeaders = value;
                    RecreateHandle();
                }
            }
        }


Actual Results:
Under Mono, the header appears regardless of if ShowColumnHeaders is true or
false.

Expected Results:
I believe that this property should be part the framework, but failing that,
mainly due to compatability with Microsoft's environment, it should allow the
addition of LVS_NOCOLUMNHEADER or similiar so that it functions identically on
Win32/64 and everywhere else Mono is supported.

How often does this happen? 

All the Time :).

Additional Information:
N/A

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list