// Currently we are using this to communicate "focus" when control is in // design mode. This can be used later if we decide to add focus // handling to our BaseItem class. void IOwner.SetFocusItem(BaseItem objFocusItem) { if (m_FocusItem != null && m_FocusItem != objFocusItem) { m_FocusItem.OnLostFocus(); } m_FocusItem = objFocusItem; if (m_FocusItem != null) m_FocusItem.OnGotFocus(); }
// Currently we are using this to communicate "focus" when control is in // design mode. This can be used later if we decide to add focus // handling to our BaseItem class. void IOwner.SetFocusItem(BaseItem objFocusItem) { if(m_FocusItem!=null && m_FocusItem!=objFocusItem) { m_FocusItem.OnLostFocus(); } if(this.DesignMode && this.Groups.Contains(objFocusItem)) { foreach(BaseItem panel in this.Groups) BaseItem.CollapseSubItems(panel); } m_FocusItem=objFocusItem; if(m_FocusItem!=null) m_FocusItem.OnGotFocus(); if(!this.DesignMode) EnsureVisible(m_FocusItem); }
void IOwner.SetFocusItem(BaseItem objFocusItem) { if (DockSide == eDockSide.Document && m_Owner != null) { ((IOwner)m_Owner).SetFocusItem(objFocusItem); return; } if (m_FocusItem != null && m_FocusItem != objFocusItem) { m_FocusItem.OnLostFocus(); } m_FocusItem = objFocusItem; if (m_FocusItem != null) m_FocusItem.OnGotFocus(); if (FocusItemChange != null) FocusItemChange(this, new EventArgs()); }
internal void SetFocusItem(BaseItem objFocus) { if(m_ParentItem==null || m_ParentItem.Parent!=null) return; BaseItem objItem=FocusedItem(); if(objItem==objFocus) return; if(objItem!=null) objItem.OnLostFocus(); if(objFocus!=null) objFocus.OnGotFocus(); }
// Currently we are using this to communicate "focus" when control is in // design mode. This can be used later if we decide to add focus // handling to our BaseItem class. void IOwner.SetFocusItem(BaseItem objFocusItem) { if (_FocusItem != null && _FocusItem != objFocusItem) { _FocusItem.OnLostFocus(); } OnSetFocusItem(objFocusItem); _FocusItem = objFocusItem; if (_FocusItem != null) _FocusItem.OnGotFocus(); }
// Currently we are using this to communicate "focus" when control is in // design mode. This can be used later if we decide to add focus // handling to our BaseItem class. void IOwner.SetFocusItem(BaseItem objFocusItem) { if(m_FocusItem!=null && m_FocusItem!=objFocusItem) { m_FocusItem.OnLostFocus(); } if(objFocusItem==null) objFocusItem=null; if(this.DesignMode && this.Panels.Contains(objFocusItem)) { foreach(BaseItem panel in this.Panels) BaseItem.CollapseSubItems(panel); } m_FocusItem=objFocusItem; if(m_FocusItem!=null) m_FocusItem.OnGotFocus(); }