BrightIdeasSoftware.ObjectListView.InitializeCheckBoxImages C# (CSharp) Method

InitializeCheckBoxImages() protected method

Make sure the small image list for this control has checkbox images (used for sub-item checkboxes).
This gives the ListView a small image list, if it doesn't already have one.
protected InitializeCheckBoxImages ( ) : void
return void
        protected virtual void InitializeCheckBoxImages()
        {
            // Don't mess with the image list in design mode
            if (this.DesignMode)
                return;

            ImageList il = this.SmallImageList;
            if (il == null) {
                il = new ImageList();
                il.ImageSize = new Size(16, 16);
                il.ColorDepth = ColorDepth.Depth32Bit;
            }

            this.AddCheckStateBitmap(il, CHECKED_KEY, CheckBoxState.CheckedNormal);
            this.AddCheckStateBitmap(il, UNCHECKED_KEY, CheckBoxState.UncheckedNormal);
            this.AddCheckStateBitmap(il, INDETERMINATE_KEY, CheckBoxState.MixedNormal);

            this.SmallImageList = il;
        }
ObjectListView