コード例 #1
0
 private void Construct(ListRowCollection lrcInitColl, string sInitKey)
 {
     lrcItems     = lrcInitColl;
     sKey         = sInitKey;
     m_arRow      = new AlphaListRow();
     m_arRow.Text = sInitKey;
 }
コード例 #2
0
        public SequentialListBox()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.UpdateStyles();

            m_scItems              = new StringCollectionWithEvents();
            m_scItems.ItemAdded   += new StringCollectionWithEvents.ItemAddedEventHandler(m_scItems_ItemAdded);
            m_scItems.ItemChanged += new StringCollectionWithEvents.ItemChangedEventHandler(m_scItems_ItemChanged);
            m_scItems.ItemRemoved += new StringCollectionWithEvents.ItemRemovedEventHandler(m_scItems_ItemRemoved);

            this.Resize += new EventHandler(SequentialListBox_Resize);
            this.Paint  += new PaintEventHandler(SequentialListBox_Paint);

            pRowControls = new ListRowCollection();

            pRowControls.EntryAdded     += new EventHandler(pRowControls_EntryAdded);
            pRowControls.EntryRemoved   += new ListRowCollection.EntryRemovedHandler(pRowControls_EntryRemoved);
            pRowControls.EntryChanged   += new ListRowCollection.EntryChangedHandler(pRowControls_EntryChanged);
            pRowControls.EntryClicked   += new ListRowCollection.EntryClickedHandler(pRowControls_EntryClicked);
            pRowControls.EntriesCleared += new EventHandler(pRowControls_EntriesCleared);
            pRowControls.CmdKeyPressed  += new CmdKeyPressedHandler(pRowControls_CmdKeyPressed);

            ListScroller.Scroll += new ScrollEventHandler(ListScroller_Scroll);

            BorderPen = new Pen(Color.FromArgb(152, 152, 152));

            pSelectedIndex = -1;

            this.BackColorChanged += new EventHandler(SequentialListBox_BackColorChanged);

            ListScroller.LargeChange = SCROLL_LARGE_CHANGE;
            ListScroller.SmallChange = SCROLL_SMALL_CHANGE;
            UpdateScrollBar();

            RowSelectedColor = Color.FromArgb(213, 218, 244);
            RowColor2        = Color.FromArgb(255, 255, 255);
            RowColor1        = Color.FromArgb(245, 245, 245);
        }
コード例 #3
0
 public AlphaListRowGroup(ListRowCollection lrColl, string sInitKey)
 {
     Construct(lrColl, sInitKey);
 }