protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         fSubItems.Dispose();
         fSubItems = null;
     }
     base.Dispose(disposing);
 }
 public LBItem(ListBox owner, int level)
 {
     Color     = Colors.Gold;
     Checked   = false;
     Data      = null;
     fLevel    = (int)level;
     fOwner    = owner;
     fParent   = null;
     fSubItems = new LBItemList(fOwner, this);
     Text      = "";
 }
        private void ReindexList(LBItemList aList, ref int aIndex)
        {
            int num = aList.Count;

            for (int i = 0; i < num; i++)
            {
                aIndex++;
                LBItem item = aList.GetItem(i);
                item.AbsoluteIndex = aIndex;
                item.VisibleIndex  = aIndex;
                fColumnSize++;
            }
        }
        public ListBox(BaseControl owner)
            : base(owner)
        {
            fMode                  = MODE_LIST;
            fColumnTitles          = new LBColumnTitles();
            fColumnTitles.OnChange = OnChange;
            fItems                 = new LBItemList(this, null);
            fItems.OnChange        = OnChange;
            fColumns               = 1;
            fTopIndex              = 0;
            fSelIndex              = 0;
            Options                = new LBOptions();

            ScrollBar          = new ScrollBar(this);
            ScrollBar.Min      = 0;
            ScrollBar.Max      = 100;
            ScrollBar.Pos      = 0;
            ScrollBar.OnChange = OnScroll;
            ScrollBar.Left     = Width - ScrollBar.Width;
            ScrollBar.Top      = 0;
            ScrollBar.Height   = 104;

            SelColor       = Colors.Gray;
            SelBorderColor = Colors.Gray;
            Height         = 100;
            Width          = 200;
            ItemHeight     = Font.Height + 2;
            BaseScreen scr = MainWindow.Screen;

            CheckImage  = NWResourceManager.LoadImage(scr, "itf/Check.tga", Colors.None);
            CheckHeight = (int)((int)CheckImage.Height / 3);
            CheckWidth  = (int)CheckImage.Width;

            TVBtn       = NWResourceManager.LoadImage(scr, "itf/TVBtn.tga", Colors.Black);
            LevelOffset = (int)TVBtn.Width;
        }