This subclass of ListView is used to make the column headers for a Constituent Chart. It's main function is to handle double-clicks on column boundaries so the chart (which is neither a ListView nor a BrowseViewer) can resize its columns.
Наследование: System.Windows.Forms.ListView, IFWDisposable
Пример #1
0
		private void BuildTopStuffUI()
		{
			m_body = new ConstChartBody(m_logic, this) { Cache = m_cache, Dock = DockStyle.Fill };

			// Seems to be right (cf BrowseViewer) but not ideal.
			m_headerMainCols = new ChartHeaderView(this) { Dock = DockStyle.Top,
				View = View.Details, Height = 22, Scrollable = false,
				AllowColumnReorder = false };
			m_headerMainCols.Layout += m_headerMainCols_Layout;
			m_headerMainCols.SizeChanged += m_headerMainCols_SizeChanged;

			m_topStuff = new Panel { Dock = DockStyle.Fill };
			m_topStuff.Controls.AddRange(new Control[] { m_body, m_headerMainCols });
		}
Пример #2
0
		/// <summary>
		/// Make one. This variant is used in testing (to plug in a known logic class).
		/// </summary>
		internal ConstituentChart(FdoCache cache, ConstituentChartLogic logic)
		{
			m_cache = cache;
			m_logic = logic;
			this.SuspendLayout();
			m_ribbon = new InterlinRibbon(m_cache, 0);
			m_ribbon.Dock = DockStyle.Fill; // fills the 'bottom stuff'
			m_logic.Ribbon = m_ribbon as IInterlinRibbon;
			m_toolTip = new ToolTip(); // Holds tooltip help for 'Move Here' buttons.
			// Set up the delays for the ToolTip.
			m_toolTip.AutoPopDelay = 5000;
			m_toolTip.InitialDelay = 1000;
			m_toolTip.ReshowDelay = 500;
			// Force the ToolTip text to be displayed whether or not the form is active.
			m_toolTip.ShowAlways = true;

			m_bottomStuff = new Panel();
			m_bottomStuff.SuspendLayout();
			m_bottomStuff.Height = 100; // Enhance: figure based on contents or at least number of rows.
			m_bottomStuff.Dock = DockStyle.Bottom;

			m_buttonRow = new Panel();
			m_buttonRow.Height = new Button().Height; // grab the default height of a button; don't insert any yet.
			m_buttonRow.Dock = DockStyle.Top;
			m_buttonRow.Layout += new LayoutEventHandler(m_buttonRow_Layout);

			m_bottomStuff.Controls.AddRange(new Control[] { m_ribbon, m_buttonRow });
			m_fContextMenuButtonsEnabled = true;
			m_bottomStuff.ResumeLayout();

			m_body = new ConstChartBody(m_logic, this);
			m_body.Cache = m_cache;
			m_body.Dock = DockStyle.Fill;

			//m_headerGroups = new ChartHeaderView();
			m_headerMainCols = new ChartHeaderView(this);
			m_headerMainCols.Dock = DockStyle.Top;
			m_headerMainCols.Layout += new LayoutEventHandler(m_headerMainCols_Layout);
			m_headerMainCols.SizeChanged += new EventHandler(m_headerMainCols_SizeChanged);
			m_headerMainCols.View = System.Windows.Forms.View.Details;
			m_headerMainCols.Height = 22; // Seems to be right (cf BrowseViewer) but not ideal.
			m_headerMainCols.Scrollable = false;
			m_headerMainCols.AllowColumnReorder = false;
			m_headerMainCols.ColumnWidthChanged += new ColumnWidthChangedEventHandler(m_headerMainCols_ColumnWidthChanged);
			//m_headerGroups.Layout += new LayoutEventHandler(m_headerGroups_Layout);

			m_logic.Ribbon_Changed += new EventHandler(m_logic_Ribbon_Changed);

			m_topStuff = new Panel();
			m_topStuff.Dock = DockStyle.Fill;
			m_topStuff.Controls.AddRange(new Control[] { m_body, m_headerMainCols /*, m_headerGroups */});

			this.Controls.AddRange(new Control[] { m_topStuff, m_bottomStuff });

			this.ResumeLayout();
		}