Beispiel #1
0
        /// <summary>
        /// The native window's original handle is released
        /// and the handle of the TextBox is assigned to it.
        /// </summary>
        public void AssignTextBoxHandle(ImageComboBox owner)
        {
            Owner          = owner;
            cbxinfo.cbSize = Marshal.SizeOf(cbxinfo);
            GetComboBoxInfo(Owner.Handle, ref cbxinfo);

            if (!this.Handle.Equals(IntPtr.Zero))
            {
                this.ReleaseHandle();
            }
            this.AssignHandle(cbxinfo.hwndEdit);
        }
Beispiel #2
0
        private void LoadBrowsers(ImageComboBox.ImageComboBox dropdownBox)
        {
            dropdownBox.Items.Clear();
            imlBrowsers.Images.Clear();

            Browser[] browsers = BrowserManager.Browsers;

            foreach (Browser browser in browsers)
            {
                imlBrowsers.Images.Add(browser.Name, browser.Icon);
                dropdownBox.Items.Add(new ImageComboBoxItem(imlBrowsers.Images.IndexOfKey(browser.Name), browser.Name, 0));
            }

            if (dropdownBox.Items.Count > 0)
            {
                dropdownBox.SelectedIndex = 0;
            }
        }
Beispiel #3
0
 public ImageComboBoxItemCollection(ImageComboBox owner)
 {
     this.owner = owner;
 }