This commit is contained in:
Kathy Ruffing 2011-03-17 09:38:48 +00:00
parent 102278048b
commit b9ce843421

View File

@ -957,7 +957,6 @@ namespace Volian.Controls.Library
} }
// find the needed cell width // find the needed cell width
trtb.AdjustWidthForContent(); trtb.AdjustWidthForContent();
if (dummyCharWidth) if (dummyCharWidth)
{ {
trtb.Text = ""; // clear out the dummy character before saving trtb.Text = ""; // clear out the dummy character before saving
@ -971,7 +970,6 @@ namespace Volian.Controls.Library
// Now adjust the Height and Width in the defined merge ranges // Now adjust the Height and Width in the defined merge ranges
AdjustMergeRangeHeightWidth(r, c, trtb, tstr, AllowWidthShrink); AdjustMergeRangeHeightWidth(r, c, trtb, tstr, AllowWidthShrink);
//// Now see the the selected row,col is in the defined merge ranges //// Now see the the selected row,col is in the defined merge ranges
//bool mrgrows = false; //bool mrgrows = false;
//bool mrgcols = false; //bool mrgcols = false;
@ -1112,9 +1110,8 @@ namespace Volian.Controls.Library
if (!mrgcols) if (!mrgcols)
{ {
// add adjustment for grid and cell borders // add adjustment for grid and cell borders
int newwidth = trtb.Width + 2; int newwidth = trtb.Width + 3; // 2;
if (newwidth > (this.Cols[c].Width == -1 ? this.Cols.DefaultSize : this.Cols[c].Width) || AllowWidthShrink || r == 0)
if (newwidth > (this.Cols[c].Width==-1?this.Cols.DefaultSize:this.Cols[c].Width) || AllowWidthShrink || r == 0)
this.Cols[c].Width = newwidth; this.Cols[c].Width = newwidth;
} }
} }
@ -1299,12 +1296,16 @@ namespace Volian.Controls.Library
for (int c = 0; c < this.Cols.Count; c++) for (int c = 0; c < this.Cols.Count; c++)
this.ConvertTextCellToRTF(r, c); this.ConvertTextCellToRTF(r, c);
} }
//this.Refresh(); //this.Refresh();
//Application.DoEvents(); //Application.DoEvents();
this.AdjustGridControlSize(); this.AdjustGridControlSize();
SetupCellUserData(); SetupCellUserData();
//RemoveBlankSpaceFromColumns(); //RemoveBlankSpaceFromColumns();
RemoveBlankSpaceFromRows(); RemoveBlankSpaceFromRows();
} }
public void FixTableCellsHeightWidth() public void FixTableCellsHeightWidth()
@ -2532,7 +2533,7 @@ namespace Volian.Controls.Library
idx = -1; idx = -1;
} }
} while (idx != -1); } while (idx != -1);
maxRow = curRow + 1; maxRow = curRow; // +1;
curRow = 0; curRow = 0;
curCol = 0; curCol = 0;
// The resulting Table Grid size in rows and columns // The resulting Table Grid size in rows and columns
@ -2549,7 +2550,6 @@ namespace Volian.Controls.Library
for (int r = 0; r <= maxRow; r++) for (int r = 0; r <= maxRow; r++)
for (int c = 0; c <= maxCol; c++) for (int c = 0; c <= maxCol; c++)
tci[r, c] = new TableCellInfo(); tci[r, c] = new TableCellInfo();
// Read in each cell of the grid // Read in each cell of the grid
idx = 0; idx = 0;
idxst = 0; idxst = 0;
@ -2704,7 +2704,7 @@ namespace Volian.Controls.Library
{ {
// find the curent column and merge remaining columns to the right // find the curent column and merge remaining columns to the right
colPos = idxst - strow; colPos = idxst - strow;
curCol = dicCols[colPos]; curCol = dicCols.Count==0?0:dicCols[colPos];
while (curCol > prevCol + 1) while (curCol > prevCol + 1)
{ {
tci[curRow, prevCol].MergeColRight = true; tci[curRow, prevCol].MergeColRight = true;