Esempio n. 1
0
 // 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();
 }
Esempio n. 2
0
		// 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);
		}
Esempio n. 3
0
        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());
        }
Esempio n. 4
0
		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();
		}
Esempio n. 5
0
 // 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();
 }
Esempio n. 6
0
		// 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();
		}