This commit is contained in:
2011-04-26 20:01:48 +00:00
parent 2ec5e1b8dc
commit 271c1ce923
4 changed files with 48 additions and 5 deletions

View File

@@ -46,6 +46,7 @@ namespace Volian.Controls.Library
}
void MyFlexGrid_Resize(object sender, EventArgs e)
{
if (MyFlexGrid.ReadingXml) return;
this.Size = new Size(MyFlexGrid.Width + GridMargin, MyFlexGrid.Height + GridMargin);
AdjustTableWidthAndLocation();
AdjustLocation();
@@ -202,10 +203,11 @@ namespace Volian.Controls.Library
private string _OrigRtf; // used to store original rtf to allow for 'escape' key restore
void MyFlexGrid_SelChange(object sender, EventArgs e)
{
if (Initializing) return;
//if (Initializing) return;
//Volian.Base.Library.vlnStackTrace.ShowStackLocal("MyFlexGrid_SelChange {0}",MyFlexGrid.Selection);
RTBLastFocus = false;
MyStepRTB.Visible = false; // Hide the editor if the Selection Changes
if (Initializing) return;
if (MyFlexGrid.Selection.IsSingleCell && MyFlexGrid.Row >= 0 && MyFlexGrid.Col >= 0)
{
object obj = MyFlexGrid[MyFlexGrid.Row, MyFlexGrid.Col];
@@ -334,6 +336,7 @@ namespace Volian.Controls.Library
}
public override void RefreshContent()
{
_ActiveMode = MyFlexGrid.ContainsFocus;
using (Grid myGrid = MyItemInfo.MyContent.MyGrid.Get())
{
MyItemInfo.MyContent.MyGrid.ResetContent(myGrid);
@@ -562,8 +565,8 @@ namespace Volian.Controls.Library
{
Focus();
MyFlexGrid.Focus();
if (!MyFlexGrid.IsRoTable) // Table ROs are none editable - don't select a table cell
MyFlexGrid.Select(0, 0);
//if (!MyFlexGrid.IsRoTable) // Table ROs are none editable - don't select a table cell
// MyFlexGrid.Select(0, 0);
}
else
{