This commit is contained in:
@@ -524,6 +524,12 @@ namespace Volian.Controls.Library
|
||||
CellRange cr = GetMergedRange(row, col);
|
||||
return (cr.r1 == row && cr.c1 == col);
|
||||
}
|
||||
private bool _ReadingXml = false;
|
||||
|
||||
public bool ReadingXml
|
||||
{
|
||||
get { return _ReadingXml; }
|
||||
}
|
||||
private static Regex _ReplaceVESymbFix = new Regex(@"({\\f[0-9]+[^ ]* )(VESymbFix)(;})");
|
||||
private static Regex _ReplaceArialUnicodeMS = new Regex(@"({\\f[0-9]+[^ ]* )(Arial Unicode MS)(;})");
|
||||
private static Regex _ReplaceTextFont = new Regex(@"({\\f[0-9]+[^ ]* )(?((?!VESymbFix)(?!Arial Unicode MS))([^;]*)|(!!!!))(;})");
|
||||
@@ -555,12 +561,17 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
Clear();
|
||||
MergedRanges.Clear();
|
||||
_ReadingXml = true;
|
||||
//Console.WriteLine("LoadGrid - Before ReadXML");
|
||||
using (StringReader sr = new StringReader(str))
|
||||
{
|
||||
ReadXml(sr);
|
||||
this.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.None;
|
||||
sr.Close();
|
||||
}
|
||||
//Console.WriteLine("LoadGrid - After ReadXML");
|
||||
_ReadingXml = false;
|
||||
Select(-1, -1); // this keeps the cell from being selected when the grid is first displayed
|
||||
Visible = true;
|
||||
|
||||
}
|
||||
@@ -617,8 +628,33 @@ namespace Volian.Controls.Library
|
||||
this.KeyDown += new KeyEventHandler(VlnFlexGrid_KeyDown);
|
||||
this.KeyUp +=new KeyEventHandler(VlnFlexGrid_KeyUp);
|
||||
TableCellEditor.EditMode = TableCellEditor.Visible; // need to comment out for compile for only jsj - 07FEB2011
|
||||
this.MouseDown += new MouseEventHandler(VlnFlexGrid_MouseDown);
|
||||
}
|
||||
|
||||
void VlnFlexGrid_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
int left = 0;
|
||||
int top = 0;
|
||||
int col = 0;
|
||||
int row = 0;
|
||||
while (e.X > left && col < Cols.Count)
|
||||
{
|
||||
left += Cols[col].Width > 0 ? Cols[col].Width : Cols.DefaultSize;
|
||||
col++;
|
||||
}
|
||||
while (e.Y > top && row < Rows.Count)
|
||||
{
|
||||
top += Rows[row].Height > 0 ? Rows[row].Height : Rows.DefaultSize;
|
||||
row++;
|
||||
}
|
||||
col--;
|
||||
row--;
|
||||
//Console.WriteLine("Mousedown Row, Col [{0},{1}]", row, col);
|
||||
Select(row, col);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _tableCellEditor_HeightChanged(object sender, EventArgs args)
|
||||
{
|
||||
if (_tableCellEditor._initializingEdit || !_tableCellEditor.Visible) return;
|
||||
|
Reference in New Issue
Block a user