Example #1
0
            public LongEnumControlWrapper(PropertyEditorControlContext context, int dropDownHeight)
            {
                DoubleBuffered    = true;
                m_longEnumControl = new LongEnumControl(context, dropDownHeight);

                Controls.Add(m_longEnumControl);
                m_longEnumControl.SizeChanged += (sender, e) => Height = m_longEnumControl.Height + 2;

                SizeChanged += (sender, e) =>
                {
                    m_longEnumControl.Location = new Point(1, 1);
                    m_longEnumControl.Size     = new Size(Width - 1, Height - 1);
                };
            }
Example #2
0
        // Updates the enum list on all the Controls created by this LongEnumEditor.
        private void UpdateEnumControl(LongEnumControl enumControl)
        {
            if (m_names == null) // no enumeration defined
            {
                return;
            }

            AutoCompleteStringCollection filterVals = new AutoCompleteStringCollection();

            enumControl.m_listBox.Items.Clear();
            for (int i = 0; i < m_names.Length; i++)
            {
                enumControl.m_listBox.Items.Add(m_displayNames[i]);
                filterVals.Add(m_displayNames[i]);
            }
            if (filterVals.Count > 0)
            {
                enumControl.AutoCompleteCustomSource = filterVals;
            }
        }
Example #3
0
 public LongEnumControlWrapper(PropertyEditorControlContext context, int dropDownHeight)
 {
     DoubleBuffered = true;
     m_longEnumControl = new LongEnumControl(context, dropDownHeight);
     
     Controls.Add(m_longEnumControl);
     m_longEnumControl.SizeChanged += (sender, e) => Height = m_longEnumControl.Height + 2;
     
     SizeChanged += (sender, e) =>
         {
             m_longEnumControl.Location = new Point(1, 1);
             m_longEnumControl.Size = new Size(Width - 1, Height - 1);
         };
    
 }
Example #4
0
        // Updates the enum list on all the Controls created by this LongEnumEditor.
        private void UpdateEnumControl(LongEnumControl enumControl)
        {
            if (m_names == null) // no enumeration defined
                return;

            AutoCompleteStringCollection filterVals = new AutoCompleteStringCollection();
            enumControl.m_listBox.Items.Clear();
            for (int i = 0; i < m_names.Length; i++)
            {
                enumControl.m_listBox.Items.Add(m_displayNames[i]);
                filterVals.Add(m_displayNames[i]);
            }
            if (filterVals.Count > 0)
                enumControl.AutoCompleteCustomSource = filterVals;
        }