private void _kcmbAddress_SelectedIndexChanged(object sender, EventArgs e) { _lastUrlItemLabel?.performMouseLeave(null); _lastUrlItemLabel = null; _toolbar.Focus(); _kcmbAddress.Focus(); _kcmbAddress.PerformClick(); }
private void _kcmbAddress_HoveredSelectionChanged(object sender, HoveredSelectionChangedEventArgs e) { var pc = _kcmbAddress.KryptonComboBoxControl.PointToScreen(e.Bounds.Location); _lastUrlItemLabel?.performMouseLeave(null); var label = e.Item as UrlItemLabel; if (label == null) { return; } label.Location = new Point(pc.X, pc.Y + label.Height / 2); _lastUrlItemLabel = label; _lastUrlItemLabel.performMouseEnter(null); }
public BrowserControl() { InitializeComponent(); BackColor = Color.FromArgb(239, 246, 253); _centerPanel.BackColor = BackColor; #region 测试例子 UrlItemLabel urlItem = new UrlItemLabel { Url = "https://www.bing.com/", Title = "必应搜索", }; UrlItemLabel urlItem1 = new UrlItemLabel { Url = "https://www.baidu.com/", Title = "百度一下,你就知道" }; UrlItemLabel urlItem2 = new UrlItemLabel { Url = "https://www.cnblogs.com/qq1223558/p/3651573.html", Title = "C#Image和Icon的相互转化" }; UrlItemLabel urlItem3 = new UrlItemLabel { Url = null, Title = "这是一个空链接" }; #endregion _initialToolbar(); _initialAddressbar(); _initialWebBrowser(); loadAddressbar(new List <UrlItemLabel> { urlItem, urlItem1, urlItem2, urlItem3 }); }
private void kryptonComboBoxControlOnSelectionChangeCommitted(object sender, EventArgs e) { _lastUrlItemLabel?.performMouseLeave(null); _lastUrlItemLabel = null; }
private void kryptonComboBoxControlOnDropDownClosed(object sender, EventArgs e) { _lastUrlItemLabel?.performMouseLeave(null); _lastUrlItemLabel = null; }