using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
using C1.Win.C1FlexGrid;
namespace Volian.Controls.Library
{
public partial class GridItem : EditItem
{
/*
* TODO: (2/2/11)
* 1) KBR Need to include/handle StepRTB/EditItem Events: Add for grid items, the events that
* are handled by StepRTB/EditItem. Should these be abstract events within EditItem so
* that it 'tells' you which events you need.
* May Need yet:
* OnOpenContextMenu (grid and/or rtb)
* steprtb->OnCopystep ?
* OnCheckClipboard
* 3) KBR FindReplace.cs - had to check for Null rtbItem, so will need
* to support if GridItem. AND frmVEPROMS.cs line 1021, findreplace
* currently are set to need an RTBItem. Will need to be more general.
* 4) KBR ContextMenu for table. May want it to function in a similar way to spellcheck, with
* the contentmenu to support table options and a last item that supports existing
* contextmenu
* 6) RHM Selection is NOT selection, i.e. if merged cells, selection isn't selecting the 'merged'
* i.e. parent cell.
* 7) RHM Selecting a range can end up with uneven rows or uneven columns. We need to handle,
* some possible options are to not allow operations to occur if uneven selections;
* make selection even; etc.
* 8) KBR When data migration of tables, need to include the font if there is a symbol. Move
* AddFontTable from StepRTB.cs to a place accessible, such as volian.base. And then
* in data migration, will need to know if a font is fixed.
*/
#region Fields
public VlnFlexGrid MyFlexGrid
{
get { return _MyFlexGrid; }
set { _MyFlexGrid = value; }
}
private int _GridMargin = 11;
///
/// Margin between the EditItem and the VlnFlexGrid. Appears on the Right.
/// Will allow space to draw a Change Bar on the right side of the EditItem.
///
public int GridMargin
{
get { return _GridMargin; }
set { _GridMargin = value; }
}
#endregion
#region Event Handlers
///
/// Raises an ItemClick event when the user clicks on the Tab
///
///
///
private void lblTab_MouseDown(object sender, MouseEventArgs e)
{
MyStepPanel.OnItemClick(this, new StepPanelEventArgs(this, e));
}
void MyFlexGrid_Resize(object sender, EventArgs e)
{
this.Size = new Size(MyFlexGrid.Width + GridMargin, MyFlexGrid.Height + GridMargin);
AdjustTableWidthAndLocation();
AdjustLocation();
}
void MyFlexGrid_Enter(object sender, EventArgs e)
{
if (MyStepPanel.DisplayItemChanging) return;
MyStepRTB.MyItemInfo = MyItemInfo; // should be in vlnFlexGrid
MyStepPanel.SelectedEditItem = this;
}
void MyFlexGrid_KeyDown(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Left:
if (e.Shift) return;
MyStepRTB.StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlLeft : E_ArrowKeys.Left);
e.Handled = true;
break;
case Keys.Up:
if (e.Shift) return;
MyStepRTB.StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlUp : E_ArrowKeys.Up);
e.Handled = true;
break;
case Keys.Right:
if (e.Shift) return;
MyStepRTB.StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlRight : E_ArrowKeys.Right);
e.Handled = true;
break;
case Keys.Down:
if (e.Shift) return;
MyStepRTB.StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlDown : E_ArrowKeys.Down);
e.Handled = true;
break;
}
}
void MyFlexGrid_CursorMovement(object sender, VlnFlexGridCursorMovementEventArgs args)
{
MyStepPanel.CursorMovement(this,new Point(0,0), args.Key);
}
void MyStepRTB_LinkModifyTran(object sender, StepPanelLinkEventArgs args)
{
MyStepPanel.OnLinkModifyTran(sender, args);
}
void MyStepRTB_LinkModifyRO(object sender, StepPanelLinkEventArgs args)
{
MyStepPanel.OnLinkModifyRO(sender, args);
}
void MyStepRTB_LinkGoTo(object sender, StepPanelLinkEventArgs args)
{
MyStepPanel.OnLinkClicked(sender, args);
}
void MyStepRTB_CursorKeyPress(object sender, KeyEventArgs args)
{
MyStepPanel.StepCursorKeys(this, args);
}
void MyStepRTB_SetMenu(object sender, StepRTBMenuEventArgs args)
{
if (args.MenuGroup == null)
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ClearContextMenu();
else if (args.MenuGroup == "OpenContextMenu")
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.SetContextMenu();
else
MyStepPanel.MyStepTabPanel.MyStepTabRibbon.SetShortCutContextMenu(args.MenuGroup);
}
void MyStepRTB_AdjustTableWidth(object sender, StepRTBTableWidthEventArgs args)
{
//if ((!_MyItemInfo.IsSection && !_MyItemInfo.IsProcedure) && (_MyItemInfo.IsTable || _MyItemInfo.IsFigure))
if (args.EditMode)
{
int colR = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColRTable, MyItemInfo.ColumnMode);
int widS = /* _WidthAdjust + borderWidth + */ MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, MyItemInfo.ColumnMode);
int wNew = 70 + widS + colR * MyItemInfo.ColumnMode;
if (wNew > ItemWidth)
{
ItemWidth = wNew;
ItemLocation = TableLocation(MyParentEditItem, MyStepSectionLayoutData, wNew);
}
}
else
{
int newwidth = MyFlexGrid.Width;
if (ItemWidth != newwidth)
{
ItemWidth = newwidth;
ItemLocation = TableLocation(MyParentEditItem, MyStepSectionLayoutData, newwidth);
}
}
}
bool MyStepRTB_IsNotCurrentSelection(object sender, EventArgs args)
{
return MyStepPanel.SelectedEditItem != this;
}
void MyStepRTB_OpenAnnotations(object sender, EventArgs args)
{
OpenAnnotations();
}
void MyFlexGrid_OpenAnnotations(object sender, EventArgs args)
{
OpenAnnotations();
}
void MyStepRTB_DoMouseWheel(object sender, MouseEventArgs args)
{
DoMouseWheel(args);
}
void MyStepRTB_DoSaveContents(object sender, EventArgs args)
{
SaveContents();
}
void MyStepRTB_VisibleChanged(object sender, EventArgs e)
{
MyStepRTB.EditMode = MyStepRTB.Visible;
//Console.WriteLine("GridItem: EditMode = {0}", MyStepRTB.EditMode);
}
void MyStepRTB_ReturnToEditor(object sender, EventArgs args)
{
MyFlexGrid.Focus();
MyFlexGrid.StartEditing();
}
void MyFlexGrid_Click(object sender, EventArgs e)
{
MyFlexGrid.Focus();
}
void MyStepRTB_EditModeChanged(object sender, EventArgs args)
{
AdjustColorsForEditMode();
}
private void AdjustColorsForEditMode()
{
if (MyStepRTB.EditMode)
{
MyFlexGrid.Styles["Focus"].ForeColor = MyFlexGrid.Styles["Focus"].BackColor =
MyFlexGrid.Styles["Highlight"].ForeColor = MyFlexGrid.Styles["Highlight"].BackColor = Color.SkyBlue;
}
else
{
MyFlexGrid.Styles["Focus"].ForeColor = MyFlexGrid.Styles["Highlight"].ForeColor = Color.Black;
MyFlexGrid.Styles["Focus"].BackColor = MyFlexGrid.Styles["Highlight"].BackColor = Color.LightCyan;
}
}
private string _OrigRtf; // used to store original rtf to allow for 'escape' key restore
void MyFlexGrid_SelChange(object sender, EventArgs e)
{
if (MyFlexGrid.Selection.IsSingleCell && MyFlexGrid.Row >= 0 && MyFlexGrid.Col >= 0)
_OrigRtf = MyFlexGrid[MyFlexGrid.Row, MyFlexGrid.Col].ToString();
}
void MyStepRTB_KeyDown(object sender, KeyEventArgs e)
{
if (!e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.Escape && MyStepRTB.EditMode)
{
MyStepRTB.Rtf = _OrigRtf;
MyFlexGrid.Select(MyFlexGrid.Selection);
}
}
#endregion // Event Handlers
#region Constructors
public GridItem()
{
InitializeComponent();
}
public GridItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand)
{
InitializeComponent();
SetupEventHandlers();
SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, null);
//RefreshDisplay(true); //TODO: is the argument true?
}
public GridItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem)
{
InitializeComponent();
SetupEventHandlers();
SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, nextEditItem);
//RefreshDisplay(true); //TODO: is the argument true?
}
private void SetupEventHandlers()
{
this.MyFlexGrid.Resize += new EventHandler(MyFlexGrid_Resize);
this.MyFlexGrid.Enter += new EventHandler(MyFlexGrid_Enter);
//this.MyFlexGrid.KeyDown += new KeyEventHandler(MyFlexGrid_KeyDown);
this.MyFlexGrid.CursorMovement += new VlnFlexGridCursorMovementEvent(MyFlexGrid_CursorMovement);
this.MyFlexGrid.OpenAnnotations += new VlnFlexGridEvent(MyFlexGrid_OpenAnnotations);
this.MyStepRTB.LinkGoTo += new StepRTBLinkEvent(MyStepRTB_LinkGoTo);
this.MyStepRTB.LinkModifyRO += new StepRTBLinkEvent(MyStepRTB_LinkModifyRO);
this.MyStepRTB.LinkModifyTran += new StepRTBLinkEvent(MyStepRTB_LinkModifyTran);
this.MyStepRTB.CursorKeyPress += new StepRTBCursorKeysEvent(MyStepRTB_CursorKeyPress);
this.MyStepRTB.SetMenu += new StepRTBMenuEvent(MyStepRTB_SetMenu);
this.MyStepRTB.AdjustTableWidth += new StepRTBTableWidthEvent(MyStepRTB_AdjustTableWidth);
this.MyStepRTB.IsNotCurrentSelection += new StepRTBBooleanEvent(MyStepRTB_IsNotCurrentSelection);
this.MyStepRTB.OpenAnnotations += new StepRTBEvent(MyStepRTB_OpenAnnotations);
this.MyStepRTB.DoMouseWheel += new StepRTBMouseEvent(MyStepRTB_DoMouseWheel);
this.MyStepRTB.DoSaveContents += new StepRTBEvent(MyStepRTB_DoSaveContents);
this.MyStepRTB.VisibleChanged += new EventHandler(MyStepRTB_VisibleChanged);
this.MyStepRTB.ReturnToEditor += new StepRTBEvent(MyStepRTB_ReturnToEditor);
this.MyFlexGrid.Click += new EventHandler(MyFlexGrid_Click);
this.MyStepRTB.EditModeChanged += new StepRTBEvent(MyStepRTB_EditModeChanged);
this.MyStepRTB.KeyDown += new KeyEventHandler(MyStepRTB_KeyDown);
this.MyFlexGrid.SelChange += new EventHandler(MyFlexGrid_SelChange);
}
#endregion
#region Override Method and Properties
public override int BorderWidth { get { return (MyFlexGrid.Width - MyFlexGrid.ClientRectangle.Width); } }
public override Point ContentLocation
{
get { return new Point(Location.X + MyFlexGrid.Left, Location.Y); }
set { Location = new Point(value.X - MyFlexGrid.Left, value.Y); }
}
public override string TabFormat { get { return _TabFormat; } set { _TabFormat = value; } }
public override void AdjustTableWidthAndLocation()
{
//_MyStepRTB.Font = MyStepData.Font.WindowsFont;
//ItemWidth = (int)GetTableWidth(MyStepRTB.Font, MyItemInfo.MyContent.Text, true);
//ItemWidth = MyFlexGrid.Width;
ItemLocation = new Point(50, _MyParentEditItem.Bottom);
ItemLocation = TableLocation(_MyParentEditItem, MyStepSectionLayoutData, ItemWidth);
}
public override void SetToolTip(string tip)
{
DevComponents.DotNetBar.SuperTooltipInfo tpi = new DevComponents.DotNetBar.SuperTooltipInfo("", "", tip, null, null, DevComponents.DotNetBar.eTooltipColor.Lemon);
_MyToolTip.MinimumTooltipSize = new Size(0, 24);
_MyToolTip.TooltipDuration = 3;
_MyToolTip.SetSuperTooltip(MyStepRTB, tpi);
}
public override void RefreshContent()
{
// content, i.e. MyContent, of the grid has changed, refresh the grid
/*
* Need:
* 'RefreshDisplay': Something to display grid
* 'IdentifyMe': Something to highlight appropriately, i.e. copy step OR backgroun color (annotation or not)
* 'SetExpandAndExpander': Handles whether it is visible, i.e. if step is collapsed - this is not visible.
*/
}
public override int TableWidth { get { return 0; } } // DONE
public override int ItemLeft
{
get { return Left + lblTab.Left; }
set { Left = value - lblTab.Left; }
}
public override int ContentLeft { get { return Left + MyFlexGrid.Left; } }
public override int ContentWidth
{
get { return MyFlexGrid.Width; }
set
{
Width = value + lblTab.Left + lblTab.Width;
}
}
public override Point ItemLocation
{
get { return new Point(Location.X + lblTab.Left, Location.Y); }
set { Location = new Point(value.X - lblTab.Left, value.Y); }
}
public override int ItemWidth
{
get { return Width - lblTab.Left; }
set
{
Width = GridMargin + value + lblTab.Left;
}
}
public override void RefreshOrdinal()
{
TabFormat = null; // Reset Tab
}
public override bool Expanded
{
get {return !Colapsing;}
set {;} // Tables are always expanded.
}
public override void RefreshTab() { TabFormat = null;}
public override void SetFocus() { MyFlexGrid.Focus();}
public override void SaveContents()
{
if(MyFlexGrid.Row >= 0 && MyFlexGrid.Col >= 0) // Only if a Cell is Selected
MyFlexGrid[MyFlexGrid.Row, MyFlexGrid.Col] = MyStepRTB.Rtf;
}
public override bool CanExpand { get { return false; } set { ;} }
public override void HandleResize() { ;} // DONE
public override void MatchExpanded() { ;} // DONE
public override void ItemSelect()
{
// Was getting an Error that _MyStepRTB was Disposed RHM 20101217
if (!MyFlexGrid.Disposing)
{
MyFlexGrid.Focus();
MyFlexGrid.Select(0, 0);
}
else
{
_MyLog.WarnFormat("Attempt to give Focus to Disposed Object {0}", MyID);
}
ScrollToCenter();
}
public override void ItemShow()
{
MyFlexGrid.Focus();
ScrollToCenter();
}
public override StepRTB MyStepRTB { get { return MyFlexGrid.TableCellEditor; } }
public override DialogResult ReplaceText(string rpltxt, string fndstr, bool caseSensitive, bool matchWholeWord, bool reverse, bool prompt, IWin32Window fndrpldlg)
{
int r = MyFlexGrid.Row;
int c = MyFlexGrid.Col;
if (!reverse)
{
int w = MyFlexGrid.Cols.Count;
int h = MyFlexGrid.Rows.Count;
while (r < h)
{
CellRange cr = MyFlexGrid.GetMergedRange(r, c);
if (cr.r1 == r && cr.c1 == c)
{
int ss = MyStepRTB.SelectionStart;
int sl = MyStepRTB.SelectionLength;
MyFlexGrid.StartEditing();
MyStepRTB.Select(ss, sl); // need to reset selection because startediting positions to end.
string oldRtf = MyStepRTB.Rtf;
DialogResult dr = MyStepRTB.ReplaceText(rpltxt, fndstr, caseSensitive, matchWholeWord, reverse, prompt, fndrpldlg);
if (oldRtf != MyStepRTB.Rtf) MyFlexGrid[r, c] = MyStepRTB.Rtf;
if (dr == DialogResult.Yes || dr == DialogResult.Cancel) return dr;
}
c = c + 1;
if (c == w)
{
c = 0;
r = r + 1;
}
if (r < h)
{
MyFlexGrid.Select(r, c);
MyStepRTB.Select(0, 0);
}
}
}
else // reverse
{
while (r >= 0)
{
CellRange cr = MyFlexGrid.GetMergedRange(r, c);
if (cr.r1 == r && cr.c1 == c)
{
int ss = MyStepRTB.SelectionStart;
int sl = MyStepRTB.SelectionLength;
MyFlexGrid.StartEditing();
MyStepRTB.Select(ss, sl);
string oldRtf = MyStepRTB.Rtf;
DialogResult dr = MyStepRTB.ReplaceText(rpltxt, fndstr, caseSensitive, matchWholeWord, reverse, prompt, fndrpldlg);
if (oldRtf != MyStepRTB.Rtf) MyFlexGrid[r, c] = MyStepRTB.Rtf;
if (dr == DialogResult.Yes || dr == DialogResult.Cancel) return dr;
}
c = c - 1;
if (c < 0)
{
c = MyFlexGrid.Cols.Count - 1;
r = r - 1;
}
cr = MyFlexGrid.GetMergedRange(r, c);
if (r >= 0 && cr.r1 == r && cr.c1 == c)
{
MyFlexGrid.Select(r, c);
MyFlexGrid.StartEditing();
MyStepRTB.Select(MyStepRTB.Text.Length, 0);
}
}
}
return DialogResult.No;
}
public override bool FindText(string str, bool caseSensitive, bool matchWholeWord, bool reverse)
{
int r = MyFlexGrid.Row;
int c = MyFlexGrid.Col;
if (!reverse)
{
int w = MyFlexGrid.Cols.Count;
int h = MyFlexGrid.Rows.Count;
while (r < h)
{
CellRange cr = MyFlexGrid.GetMergedRange(r, c);
if (cr.r1 == r && cr.c1 == c)
{
int ss = MyStepRTB.SelectionStart + MyStepRTB.SelectionLength;
MyFlexGrid.StartEditing();
MyStepRTB.Select(ss, 0); // need to reset selection because startediting positions to end.
bool scn = MyStepRTB.FindText(str, caseSensitive, matchWholeWord, reverse);
if (scn) return true;
}
c = c + 1;
if (c == w)
{
c = 0;
r = r + 1;
}
if (r < h)
{
MyFlexGrid.Select(r, c);
MyStepRTB.Select(0, 0);
}
}
}
else
{
while (r >= 0)
{
CellRange cr = MyFlexGrid.GetMergedRange(r, c);
if (cr.r1 == r && cr.c1 == c)
{
int ss = MyStepRTB.SelectionStart;
MyFlexGrid.StartEditing();
MyStepRTB.Select(ss, 0);
bool scn = MyStepRTB.FindText(str, caseSensitive, matchWholeWord, reverse);
if (scn) return true;
}
c = c - 1;
if (c < 0)
{
c = MyFlexGrid.Cols.Count - 1;
r = r - 1;
}
cr = MyFlexGrid.GetMergedRange(r, c);
if (r >= 0 && cr.r1 == r && cr.c1 == c)
{
MyFlexGrid.Select(r, c);
MyFlexGrid.StartEditing();
MyStepRTB.Select(MyStepRTB.Text.Length, 0);
}
}
}
return false;
}
public override void PositionToEnd()
{
int r = MyFlexGrid.Rows.Count - 1;
int c = MyFlexGrid.Cols.Count - 1;
MyFlexGrid.Select(r, c);
while (r >= 0)
{
CellRange cr = MyFlexGrid.GetMergedRange(r, c);
if (cr.r1 == r && cr.c1 == c)
{
MyFlexGrid.StartEditing();
return;
}
c = c - 1;
if (c < 0)
{
c = MyFlexGrid.Cols.Count - 1;
r = r - 1;
}
if (r >= 0)
{
MyFlexGrid.Select(r, c);
MyStepRTB.Select(MyStepRTB.Text.Length, 0);
}
}
}
public override string SelectedTextForFind
{
get
{
StepRTB srtb = MyStepRTB;
if (srtb.SelectionLength > 0)
{
if (srtb.IsSelectionLinked(srtb.SelectionStart, srtb.SelectionLength))
return srtb.SelectedText.Substring(0, srtb.SelectedText.IndexOf("#Link"));
else
return srtb.SelectedText;
}
return null;
}
}
public override bool SpellCheckNext()
{
int r = MyFlexGrid.Row;
int c = MyFlexGrid.Col;
int w = MyFlexGrid.Cols.Count;
int h = MyFlexGrid.Rows.Count;
while (r < h)
{
CellRange cr = MyFlexGrid.GetMergedRange(r, c);
if (cr.r1 == r && cr.c1 == c)
{
MyFlexGrid.Select(r, c);
MyFlexGrid.StartEditing();
string oldRtf = MyStepRTB.Rtf;
bool scn = MyStepRTB.SpellCheckNext();
if (oldRtf != MyStepRTB.Rtf) MyFlexGrid[r, c] = MyStepRTB.Rtf;
if (!scn) return false;
}
c = c + 1;
if (c == w)
{
c = 0;
r = r + 1;
}
}
return true;
}
public override void IdentifyMe(bool highlight)
{
if (highlight)
{
//for (int r = 0; r < MyFlexGrid.Rows.Count; r++)
// for (int c = 0; c < MyFlexGrid.Cols.Count; c++)
// {
// CellStyle cs = MyFlexGrid.GetCellStyle(r, c);
// CellRange cr = MyFlexGrid.GetCellRange(r, c);
// Console.WriteLine("Style[{0},{1}] = '{2}' {3} '{4}'", r,c,cs.Name,cs.BackColor,cr.StyleNew.Name);
// }
MyFlexGrid.Styles["Alternate"].BackColor =
MyFlexGrid.Styles["Normal"].BackColor = Color.Gray;
}
else
{
if (MyFlexGrid.Focused) // If active Set BackColor to the active color
SetActive();
else // Otherwise Set the BackColor to either the InactiveColor or the AnnotationColor
{
MyFlexGrid.Styles["Alternate"].BackColor =
MyFlexGrid.Styles["Normal"].BackColor =
MyItemInfo.ItemAnnotationCount == 0 ? MyStepPanel.InactiveColor : MyStepPanel.AnnotationColor;
// Turn-off Size adjustment
MyFlexGrid.Cols.Fixed = 0;
MyFlexGrid.Rows.Fixed = 0;
}
}
}
public override void SetActive()
{
AdjustColorsForEditMode();
}
private bool _Empty = false;
public override bool Empty
{
get { return _Empty; }
set { _Empty = value; }
}
public override void RefreshDisplay(bool activeMode)
{
XmlDocument xd = new XmlDocument();
xd.LoadXml(MyItemInfo.MyContent.MyGrid.Data.Replace("Courier New", "Times New Roman"));
//xd.LoadXml(MyItemInfo.MyContent.MyGrid.Data);
MyFlexGrid.Clear();
MyFlexGrid.MergedRanges.Clear();
MyFlexGrid.ReadXml(xd);
MyFlexGrid.AdjustGridControlSize();
// When a grid is read from XML, all of the styles are updated to the values in the XML.
// Thus any specific settings need to be set after the grid is read.
MyFlexGrid.Styles["Highlight"].BackColor = Color.LightCyan;
MyFlexGrid.Styles["Focus"].BackColor = Color.LightCyan;
MyFlexGrid.HighLight = activeMode ? C1.Win.C1FlexGrid.HighLightEnum.Always : C1.Win.C1FlexGrid.HighLightEnum.WithFocus;
MyFlexGrid.VwMode = MyStepPanel.VwMode;
}
public override void ToggleEditView(E_ViewMode vwMode)
{
/*
* TODO:
* 1) SaveContents
*/
RefreshDisplay(false);
MyFlexGrid.VwMode = vwMode;
}
public override int TabLeft { get { return lblTab.Left; } set { lblTab.Left = value; } }
public override Font TabFont { get { return lblTab.Font; } set { lblTab.Font = value; } }
public override string TabText { get { return lblTab.Text; } }
public override Point TabLocation { get { return lblTab.Location; } }
public override Font ContentFont { get { return MyFlexGrid.Font; } set { MyFlexGrid.Font = value; } } // TODO how do we know what font tables are in?
public override float ContentTop { get { return MyFlexGrid.Top; } }
public override void SetupHeader(ItemInfo itemInfo) { ;} // tables do not have headers
public override void ShowExpanded() {;}
public override void SetText()
{
RefreshDisplay(false);
IdentifyMe(false);
}
public override void SetExpandAndExpander(ItemInfo itemInfo) { CanExpand = false; } // can't expand a table
#endregion
}
}