Underlining the query results with a red line if they were truncated due to the set maximum column size.

Результаты запроса которые были усечены из-за превышения
максимального размера колонки будут подчёркнуты красной линией.
This commit is contained in:
lsv 2025-12-24 16:19:17 +05:00
parent 409bcc95ce
commit 9f6da5c40a

View file

@ -224,10 +224,12 @@ public:
//////////////////////////////////////////////////////////////////////////////
//CursorCellRenderer::Draw(grid, attr, dc, rect, row, col, isSelected); //
dc.SetBackgroundMode(wxSOLID);
bool istruncateLine=false;
wxString text = grid.GetCellValue(row, col);
// grey out fields if the grid is disabled
if (grid.IsEnabled())
{
istruncateLine=text.Right(5)=="(...)";
if (isSelected)
{
wxColour clr;
@ -326,6 +328,10 @@ public:
}
grid.DrawTextRectangle(dc, text,
rect, hAlign, vAlign);
if (istruncateLine) {
dc.SetPen(*wxRED_PEN);
dc.DrawLine(wxPoint(rect.x,rect.y+rect.GetHeight()-2),wxPoint(rect.x+rect.width,rect.y+rect.GetHeight()-2));
}
}
#else
class CursorCellRenderer : public wxGridCellAutoWrapStringRenderer