DataLoader fix for tables
This commit is contained in:
@@ -484,7 +484,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
private int BlankColSpace()
|
private int BlankColSpace()
|
||||||
{
|
{
|
||||||
int curColWidth = (Cols[Col].Width == -1) ? Cols.DefaultSize - 3 : Cols[Col].Width - 3;
|
int curColWidth = (Cols[Col].Width == -1) ? Cols.DefaultSize - 3 : Cols[Col].Width-3;
|
||||||
//int curRowHeightNLines = curRowHeight / (Rows.DefaultSize - 3);
|
//int curRowHeightNLines = curRowHeight / (Rows.DefaultSize - 3);
|
||||||
if (curColWidth <= Cols.DefaultSize - 3) return 0; // never have col less than default width
|
if (curColWidth <= Cols.DefaultSize - 3) return 0; // never have col less than default width
|
||||||
int blankColSpace = curColWidth;
|
int blankColSpace = curColWidth;
|
||||||
@@ -496,14 +496,16 @@ namespace Volian.Controls.Library
|
|||||||
if (Col >= cr.c1 && Col <= cr.c2)
|
if (Col >= cr.c1 && Col <= cr.c2)
|
||||||
{
|
{
|
||||||
int cellWidth = GetCellWidth(r, Col);
|
int cellWidth = GetCellWidth(r, Col);
|
||||||
srtb.Width = cellWidth;
|
//srtb.Width = cellWidth;
|
||||||
|
srtb.AdjustWidthForContent();
|
||||||
//Application.DoEvents();
|
//Application.DoEvents();
|
||||||
//int mergeCellHeightNLines = cellHeight / (Rows.DefaultSize - 3);
|
//int mergeCellHeightNLines = cellHeight / (Rows.DefaultSize - 3);
|
||||||
//int dataHeight = (cr.UserData == null) ? cellHeight : (int)cr.UserData;
|
//int dataHeight = (cr.UserData == null) ? cellHeight : (int)cr.UserData;
|
||||||
//int ud = dataHeight / (Rows.DefaultSize - 3);
|
//int ud = dataHeight / (Rows.DefaultSize - 3);
|
||||||
//if (cellHeight < dataHeight)
|
//if (cellHeight < dataHeight)
|
||||||
// Console.WriteLine("r {0}, c {1}, cell{2}, data{3}", Row, c, cellHeight, dataHeight);
|
// Console.WriteLine("r {0}, c {1}, cell{2}, data{3}", Row, c, cellHeight, dataHeight);
|
||||||
blankColSpace = Math.Min(blankColSpace, Math.Max(0, cellWidth - srtb.MaxTextWidth));
|
//blankColSpace = Math.Min(blankColSpace, Math.Max(0, cellWidth - srtb.MaxTextWidth));
|
||||||
|
blankColSpace = Math.Min(blankColSpace, Math.Max(0, cellWidth - srtb.Width));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Console.WriteLine("BlankRowSpace {0}", blankRowSpace);
|
//Console.WriteLine("BlankRowSpace {0}", blankRowSpace);
|
||||||
|
Reference in New Issue
Block a user