We need to subclass TreeView in order to override IsInputChar(), otherwise TreeView will not try to handle TAB keys (cf. LT-2190).
Inheritance: System.Windows.Forms.TreeView, IFWDisposable
Esempio n. 1
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.m_treeView = new FwTreeView();
     this.SuspendLayout();
     //
     // m_treeView
     //
     this.m_treeView.Dock       = System.Windows.Forms.DockStyle.Fill;
     this.m_treeView.ImageIndex = -1;
     //this.m_treeView.Location = new System.Drawing.Point(0, 0);
     this.m_treeView.Name = "m_treeView";
     this.m_treeView.SelectedImageIndex = -1;
     //this.m_treeView.Size = new System.Drawing.Size(292, 262);
     this.m_treeView.TabIndex = 0;
     //
     // PopupTree
     //
     //this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     //this.ClientSize = new System.Drawing.Size(292, 262);
     this.Controls.Add(this.m_treeView);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "PopupTree";
     this.ShowInTaskbar   = false;
     this.Text            = "PopupTree";
     this.ResumeLayout(false);
 }
Esempio n. 2
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
            // Must not be run more than once.
            if (IsDisposed)
            {
                return;
            }

            if (disposing)
            {
                RemoveFilter();                 // Disposes m_fwPopupMessageFilter, among other things.
                if (m_treeView != null)
                {
                    EnableAfterAndBeforeSelectHandling(false);
                    if (!Platform.IsMono)
                    {
                        // FWNX-399
                        m_treeView.MouseDown -= new MouseEventHandler(m_treeView_MouseDown);
                        m_treeView.MouseUp   -= new MouseEventHandler(m_treeView_MouseUp);
                    }

                    m_treeView.KeyDown -= new KeyEventHandler(m_treeView_KeyDown);
                    if (!Controls.Contains(m_treeView))
                    {
                        m_treeView.Dispose();
                    }
                }

                if (components != null)
                {
                    components.Dispose();
                }
            }
            m_fwPopupMessageFilter = null;
            m_treeView             = null;
            m_tnMouseDown          = null;
            // m_selectedNodeAction = null; // Can't null it, since it is a value type.
            m_tabStopControl = null;

            base.Dispose(disposing);
        }
Esempio n. 3
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            //Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************");
            // Must not be run more than once.
            if (IsDisposed)
            {
                return;
            }

            if (disposing)
            {
                RemoveFilter();                 // Disposes m_fwPopupMessageFilter, among other things.
                if (m_treeView != null)
                {
                    m_treeView.AfterSelect  -= new TreeViewEventHandler(m_treeView_AfterSelect);
                    m_treeView.BeforeSelect -= new TreeViewCancelEventHandler(m_treeView_BeforeSelect);
                    m_treeView.MouseDown    -= new MouseEventHandler(m_treeView_MouseDown);
                    m_treeView.MouseUp      -= new MouseEventHandler(m_treeView_MouseUp);
                    m_treeView.KeyDown      -= new KeyEventHandler(m_treeView_KeyDown);
                    if (!Controls.Contains(m_treeView))
                    {
                        m_treeView.Dispose();
                    }
                }

                if (components != null)
                {
                    components.Dispose();
                }
            }
            m_fwPopupMessageFilter = null;
            m_treeView             = null;
            m_tnMouseDown          = null;
            // m_selectedNodeAction = null; // Can't null it, since it is a value type.
            m_tabStopControl = null;

            base.Dispose(disposing);
        }
Esempio n. 4
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.m_treeView = new FwTreeView();
			this.SuspendLayout();
			//
			// m_treeView
			//
			this.m_treeView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.m_treeView.ImageIndex = -1;
			//this.m_treeView.Location = new System.Drawing.Point(0, 0);
			this.m_treeView.Name = "m_treeView";
			this.m_treeView.SelectedImageIndex = -1;
			//this.m_treeView.Size = new System.Drawing.Size(292, 262);
			this.m_treeView.TabIndex = 0;
			//
			// PopupTree
			//
			//this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			//this.ClientSize = new System.Drawing.Size(292, 262);
			this.Controls.Add(this.m_treeView);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "PopupTree";
			this.ShowInTaskbar = false;
			this.Text = "PopupTree";
			this.ResumeLayout(false);

		}
Esempio n. 5
0
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose(bool disposing)
		{
			System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
			// Must not be run more than once.
			if (IsDisposed)
				return;

			if (disposing)
			{
				RemoveFilter(); // Disposes m_fwPopupMessageFilter, among other things.
				if (m_treeView != null)
				{
					EnableAfterAndBeforeSelectHandling(false);
#if !__MonoCS__ // FWNX-399
					m_treeView.MouseDown -= new MouseEventHandler(m_treeView_MouseDown);
					m_treeView.MouseUp -= new MouseEventHandler(m_treeView_MouseUp);
#endif
					m_treeView.KeyDown -= new KeyEventHandler(m_treeView_KeyDown);
					if (!Controls.Contains(m_treeView))
						m_treeView.Dispose();
				}

				if(components != null)
				{
					components.Dispose();
				}
			}
			m_fwPopupMessageFilter = null;
			m_treeView = null;
			m_tnMouseDown = null;
			// m_selectedNodeAction = null; // Can't null it, since it is a value type.
			m_tabStopControl = null;

			base.Dispose( disposing );
		}
Esempio n. 6
0
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			//Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************");
			// Must not be run more than once.
			if (IsDisposed)
				return;

			if (disposing)
			{
				RemoveFilter(); // Disposes m_fwPopupMessageFilter, among other things.
				if (m_treeView != null)
				{
					m_treeView.AfterSelect -= new TreeViewEventHandler(m_treeView_AfterSelect);
					m_treeView.BeforeSelect -= new TreeViewCancelEventHandler(m_treeView_BeforeSelect);
					m_treeView.MouseDown -= new MouseEventHandler(m_treeView_MouseDown);
					m_treeView.MouseUp -= new MouseEventHandler(m_treeView_MouseUp);
					m_treeView.KeyDown -= new KeyEventHandler(m_treeView_KeyDown);
					if (!Controls.Contains(m_treeView))
						m_treeView.Dispose();
				}

				if(components != null)
				{
					components.Dispose();
				}
			}
			m_fwPopupMessageFilter = null;
			m_treeView = null;
			m_tnMouseDown = null;
			// m_selectedNodeAction = null; // Can't null it, since it is a value type.
			m_tabStopControl = null;

			base.Dispose( disposing );
		}