Make row/column drag-resizing in wxGrid "live"
Update the column width immediately, as it's being dragged, instead of drawing a temporary line showing the new column boundary using wxINVERT. This results in better user experience, as it the effect of changing the column width can be immediately seen (especially important for non-left aligned columns or columns using ellipsizition) and, equally if not more importantly, fixes wxGrid drag-resize not showing any visible UI at all with wxGTK3 and wxOSX where wxINVERT is not implemented.
This commit is contained in:
@@ -2302,10 +2302,11 @@ protected:
|
|||||||
// in progress.
|
// in progress.
|
||||||
int m_dragMoveCol;
|
int m_dragMoveCol;
|
||||||
|
|
||||||
// the last position (horizontal or vertical depending on whether the user
|
// Last horizontal mouse position while drag-moving a column.
|
||||||
// is resizing a column or a row) where a row or column separator line was
|
|
||||||
// dragged by the user or -1 of there is no drag operation in progress
|
|
||||||
int m_dragLastPos;
|
int m_dragLastPos;
|
||||||
|
|
||||||
|
// Row or column (depending on m_cursorMode value) currently being resized
|
||||||
|
// or -1 if there is no resize operation in progress.
|
||||||
int m_dragRowOrCol;
|
int m_dragRowOrCol;
|
||||||
|
|
||||||
// true if a drag operation is in progress; when this is true,
|
// true if a drag operation is in progress; when this is true,
|
||||||
@@ -2480,11 +2481,6 @@ private:
|
|||||||
const wxGridCellCoords& coords,
|
const wxGridCellCoords& coords,
|
||||||
bool isFirstDrag);
|
bool isFirstDrag);
|
||||||
|
|
||||||
// process row/column resizing drag event
|
|
||||||
void DoGridLineDrag(int pos,
|
|
||||||
const wxGridOperations& oper,
|
|
||||||
wxGridWindow* gridWindow);
|
|
||||||
|
|
||||||
// process mouse drag event in the grid window, return false if starting
|
// process mouse drag event in the grid window, return false if starting
|
||||||
// dragging was vetoed by the user-defined wxEVT_GRID_CELL_BEGIN_DRAG
|
// dragging was vetoed by the user-defined wxEVT_GRID_CELL_BEGIN_DRAG
|
||||||
// handler
|
// handler
|
||||||
@@ -2493,16 +2489,11 @@ private:
|
|||||||
bool isFirstDrag,
|
bool isFirstDrag,
|
||||||
wxGridWindow* gridWindow);
|
wxGridWindow* gridWindow);
|
||||||
|
|
||||||
void DrawGridDragLine(wxPoint position,
|
// Update the width/height of the column/row being drag-resized.
|
||||||
|
void DoGridDragResize(const wxPoint& position,
|
||||||
const wxGridOperations& oper,
|
const wxGridOperations& oper,
|
||||||
wxGridWindow* gridWindow);
|
wxGridWindow* gridWindow);
|
||||||
|
|
||||||
// return the current grid windows involved in the drag process
|
|
||||||
void GetDragGridWindows(int pos,
|
|
||||||
const wxGridOperations& oper,
|
|
||||||
wxGridWindow*& firstGridWindow,
|
|
||||||
wxGridWindow*& secondGridWindow);
|
|
||||||
|
|
||||||
// process different clicks on grid cells
|
// process different clicks on grid cells
|
||||||
void DoGridCellLeftDown(wxMouseEvent& event,
|
void DoGridCellLeftDown(wxMouseEvent& event,
|
||||||
const wxGridCellCoords& coords,
|
const wxGridCellCoords& coords,
|
||||||
@@ -2534,6 +2525,7 @@ private:
|
|||||||
|
|
||||||
void DoColHeaderClick(int col);
|
void DoColHeaderClick(int col);
|
||||||
|
|
||||||
|
void DoStartResizeRowOrCol(int col);
|
||||||
void DoStartMoveCol(int col);
|
void DoStartMoveCol(int col);
|
||||||
|
|
||||||
void DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow *gridWindow);
|
void DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow *gridWindow);
|
||||||
|
@@ -11,7 +11,6 @@
|
|||||||
/*
|
/*
|
||||||
TODO:
|
TODO:
|
||||||
|
|
||||||
- Replace use of wxINVERT with wxOverlay
|
|
||||||
- Make Begin/EndBatch() the same as the generic Freeze/Thaw()
|
- Make Begin/EndBatch() the same as the generic Freeze/Thaw()
|
||||||
- Review the column reordering code, it's a mess.
|
- Review the column reordering code, it's a mess.
|
||||||
- Implement row reordering after dealing with the columns.
|
- Implement row reordering after dealing with the columns.
|
||||||
@@ -3482,7 +3481,7 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event, wxGridRowLabelWindo
|
|||||||
{
|
{
|
||||||
case WXGRID_CURSOR_RESIZE_ROW:
|
case WXGRID_CURSOR_RESIZE_ROW:
|
||||||
{
|
{
|
||||||
DrawGridDragLine(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -3626,13 +3625,16 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event, wxGridRowLabelWindo
|
|||||||
//
|
//
|
||||||
else if ( event.Moving() )
|
else if ( event.Moving() )
|
||||||
{
|
{
|
||||||
m_dragRowOrCol = YToEdgeOfRow( pos.y );
|
const int dragRowOrCol = YToEdgeOfRow( pos.y );
|
||||||
if ( m_dragRowOrCol != wxNOT_FOUND )
|
if ( dragRowOrCol != wxNOT_FOUND )
|
||||||
{
|
{
|
||||||
if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL )
|
if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL )
|
||||||
{
|
{
|
||||||
if ( CanDragRowSize(m_dragRowOrCol) )
|
if ( CanDragRowSize(dragRowOrCol) )
|
||||||
|
{
|
||||||
|
DoStartResizeRowOrCol(dragRowOrCol);
|
||||||
ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, rowLabelWin, false);
|
ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, rowLabelWin, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( m_cursorMode != WXGRID_CURSOR_SELECT_CELL )
|
else if ( m_cursorMode != WXGRID_CURSOR_SELECT_CELL )
|
||||||
@@ -3745,6 +3747,19 @@ void wxGrid::DoColHeaderClick(int col)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxGrid::DoStartResizeRowOrCol(int col)
|
||||||
|
{
|
||||||
|
// Hide the editor if it's currently shown to avoid any weird interactions
|
||||||
|
// with it while dragging the row/column separator.
|
||||||
|
if ( IsCellEditControlShown() )
|
||||||
|
{
|
||||||
|
HideCellEditControl();
|
||||||
|
SaveEditControlValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_dragRowOrCol = col;
|
||||||
|
}
|
||||||
|
|
||||||
void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event, wxGridColLabelWindow* colLabelWin )
|
void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event, wxGridColLabelWindow* colLabelWin )
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
@@ -3774,7 +3789,7 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event, wxGridColLabelWindo
|
|||||||
switch ( m_cursorMode )
|
switch ( m_cursorMode )
|
||||||
{
|
{
|
||||||
case WXGRID_CURSOR_RESIZE_COL:
|
case WXGRID_CURSOR_RESIZE_COL:
|
||||||
DrawGridDragLine(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXGRID_CURSOR_SELECT_COL:
|
case WXGRID_CURSOR_SELECT_COL:
|
||||||
@@ -4028,13 +4043,16 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event, wxGridColLabelWindo
|
|||||||
//
|
//
|
||||||
else if ( event.Moving() )
|
else if ( event.Moving() )
|
||||||
{
|
{
|
||||||
m_dragRowOrCol = XToEdgeOfCol( x );
|
const int dragRowOrCol = XToEdgeOfCol( x );
|
||||||
if ( m_dragRowOrCol >= 0 )
|
if ( dragRowOrCol >= 0 )
|
||||||
{
|
{
|
||||||
if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL )
|
if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL )
|
||||||
{
|
{
|
||||||
if ( CanDragColSize(m_dragRowOrCol) )
|
if ( CanDragColSize(dragRowOrCol) )
|
||||||
|
{
|
||||||
|
DoStartResizeRowOrCol(dragRowOrCol);
|
||||||
ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, colLabelWin, false);
|
ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, colLabelWin, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( m_cursorMode != WXGRID_CURSOR_SELECT_CELL )
|
else if ( m_cursorMode != WXGRID_CURSOR_SELECT_CELL )
|
||||||
@@ -4105,9 +4123,6 @@ void wxGrid::CancelMouseCapture()
|
|||||||
if ( m_winCapture )
|
if ( m_winCapture )
|
||||||
{
|
{
|
||||||
DoAfterDraggingEnd();
|
DoAfterDraggingEnd();
|
||||||
|
|
||||||
// remove traces of whatever we drew on screen
|
|
||||||
Refresh();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4257,87 +4272,6 @@ wxGrid::DoGridCellDrag(wxMouseEvent& event,
|
|||||||
return performDefault;
|
return performDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGrid::GetDragGridWindows(int pos,
|
|
||||||
const wxGridOperations& oper,
|
|
||||||
wxGridWindow*& firstGridWindow,
|
|
||||||
wxGridWindow*& secondGridWindow)
|
|
||||||
{
|
|
||||||
int numFrozenLines = oper.Select(wxPoint(m_numFrozenRows, m_numFrozenCols));
|
|
||||||
|
|
||||||
if ( numFrozenLines > 0 )
|
|
||||||
{
|
|
||||||
int lineEnd = oper.GetLineEndPos(this, numFrozenLines - 1);
|
|
||||||
|
|
||||||
// check if it is within frozen windows space
|
|
||||||
if ( pos < lineEnd )
|
|
||||||
{
|
|
||||||
firstGridWindow = m_frozenCornerGridWin;
|
|
||||||
secondGridWindow = oper.GetFrozenGrid(this);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
firstGridWindow = oper.Dual().GetFrozenGrid(this);
|
|
||||||
secondGridWindow = m_gridWin;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
firstGridWindow = m_gridWin;
|
|
||||||
secondGridWindow = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxGrid::DrawGridDragLine(wxPoint position,
|
|
||||||
const wxGridOperations& oper,
|
|
||||||
wxGridWindow* gridWindow)
|
|
||||||
{
|
|
||||||
// we need the vertical position for rows and horizontal for columns here
|
|
||||||
int pos = oper.Dual().Select(CalcGridWindowUnscrolledPosition(position, gridWindow));
|
|
||||||
|
|
||||||
// don't allow resizing beneath the minimal size
|
|
||||||
const int posMin = oper.GetLineStartPos(this, m_dragRowOrCol) +
|
|
||||||
oper.GetMinimalLineSize(this, m_dragRowOrCol);
|
|
||||||
if ( pos < posMin )
|
|
||||||
pos = posMin;
|
|
||||||
|
|
||||||
// erase the previously drawn line, if any
|
|
||||||
if ( m_dragLastPos >= 0 )
|
|
||||||
{
|
|
||||||
wxGridWindow* prevGridWindows[2] = { NULL, NULL };
|
|
||||||
GetDragGridWindows(m_dragLastPos, oper, prevGridWindows[0], prevGridWindows[1]);
|
|
||||||
|
|
||||||
DoGridLineDrag(m_dragLastPos, oper, prevGridWindows[0]);
|
|
||||||
DoGridLineDrag(m_dragLastPos, oper, prevGridWindows[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// and draw it at the new position
|
|
||||||
wxGridWindow* currGridWindows[2] = { NULL, NULL };
|
|
||||||
GetDragGridWindows(pos, oper, currGridWindows[0], currGridWindows[1]);
|
|
||||||
|
|
||||||
DoGridLineDrag(pos, oper, currGridWindows[0]);
|
|
||||||
DoGridLineDrag(pos, oper, currGridWindows[1]);
|
|
||||||
|
|
||||||
m_dragLastPos = pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxGrid::DoGridLineDrag(int pos,
|
|
||||||
const wxGridOperations& oper,
|
|
||||||
wxGridWindow* gridWindow)
|
|
||||||
{
|
|
||||||
if ( !gridWindow )
|
|
||||||
return;
|
|
||||||
|
|
||||||
wxClientDC dc(gridWindow);
|
|
||||||
PrepareDCFor(dc, gridWindow);
|
|
||||||
dc.SetLogicalFunction(wxINVERT);
|
|
||||||
|
|
||||||
wxPoint offset = GetGridWindowOffset(gridWindow);
|
|
||||||
const wxRect rectWin(CalcGridWindowUnscrolledPosition(offset, gridWindow),
|
|
||||||
gridWindow->GetClientSize());
|
|
||||||
|
|
||||||
oper.DrawParallelLineInRect(dc, rectWin, pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxGrid::DoGridDragEvent(wxMouseEvent& event,
|
bool wxGrid::DoGridDragEvent(wxMouseEvent& event,
|
||||||
const wxGridCellCoords& coords,
|
const wxGridCellCoords& coords,
|
||||||
bool isFirstDrag,
|
bool isFirstDrag,
|
||||||
@@ -4349,11 +4283,11 @@ bool wxGrid::DoGridDragEvent(wxMouseEvent& event,
|
|||||||
return DoGridCellDrag(event, coords, isFirstDrag);
|
return DoGridCellDrag(event, coords, isFirstDrag);
|
||||||
|
|
||||||
case WXGRID_CURSOR_RESIZE_ROW:
|
case WXGRID_CURSOR_RESIZE_ROW:
|
||||||
DrawGridDragLine(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXGRID_CURSOR_RESIZE_COL:
|
case WXGRID_CURSOR_RESIZE_COL:
|
||||||
DrawGridDragLine(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -4528,7 +4462,7 @@ wxGrid::DoGridMouseMoveEvent(wxMouseEvent& WXUNUSED(event),
|
|||||||
{
|
{
|
||||||
if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL )
|
if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL )
|
||||||
{
|
{
|
||||||
m_dragRowOrCol = dragRow;
|
DoStartResizeRowOrCol(dragRow);
|
||||||
ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, gridWindow, false);
|
ChangeCursorMode(WXGRID_CURSOR_RESIZE_ROW, gridWindow, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4540,7 +4474,7 @@ wxGrid::DoGridMouseMoveEvent(wxMouseEvent& WXUNUSED(event),
|
|||||||
{
|
{
|
||||||
if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL )
|
if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL )
|
||||||
{
|
{
|
||||||
m_dragRowOrCol = dragCol;
|
DoStartResizeRowOrCol(dragCol);
|
||||||
ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, gridWindow, false);
|
ChangeCursorMode(WXGRID_CURSOR_RESIZE_COL, gridWindow, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4679,56 +4613,24 @@ void wxGrid::ProcessGridCellMouseEvent(wxMouseEvent& event, wxGridWindow *eventG
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// this function returns true only if the size really changed
|
void wxGrid::DoGridDragResize(const wxPoint& position,
|
||||||
bool wxGrid::DoEndDragResizeLine(const wxGridOperations& oper, wxGridWindow *gridWindow)
|
const wxGridOperations& oper,
|
||||||
|
wxGridWindow* gridWindow)
|
||||||
{
|
{
|
||||||
if ( m_dragLastPos == -1 )
|
// Get the logical position from the physical one we're passed.
|
||||||
return false;
|
const wxPoint
|
||||||
|
logicalPos = CalcGridWindowUnscrolledPosition(position, gridWindow);
|
||||||
|
|
||||||
const wxGridOperations& doper = oper.Dual();
|
// Size of the row/column is determined by the mouse coordinates in the
|
||||||
const wxSize size = gridWindow->GetClientSize();
|
// orthogonal direction.
|
||||||
wxPoint offset = GetGridWindowOffset(gridWindow);
|
const int linePos = oper.Dual().Select(logicalPos);
|
||||||
const wxPoint ptOrigin = CalcGridWindowUnscrolledPosition(offset, gridWindow);
|
|
||||||
|
|
||||||
const int posLineStart = oper.Select(ptOrigin);
|
|
||||||
const int posLineEnd = oper.Select(ptOrigin) + oper.Select(size);
|
|
||||||
|
|
||||||
// erase the last line we drew
|
|
||||||
wxGridWindow* endDragGridWindows[2] = { NULL, NULL };
|
|
||||||
GetDragGridWindows(m_dragLastPos, oper, endDragGridWindows[0], endDragGridWindows[1]);
|
|
||||||
|
|
||||||
DoGridLineDrag(m_dragLastPos, oper, endDragGridWindows[0]);
|
|
||||||
DoGridLineDrag(m_dragLastPos, oper, endDragGridWindows[1]);
|
|
||||||
|
|
||||||
// temporarily hide the edit control before resizing
|
|
||||||
HideCellEditControl();
|
|
||||||
SaveEditControlValue();
|
|
||||||
|
|
||||||
// increase the line size based on device, not logical position for frozen lines,
|
|
||||||
// so that it won't increase in size more that the window when scrolled
|
|
||||||
if ( m_dragRowOrCol < oper.Select(wxPoint(m_numFrozenRows, m_numFrozenCols)) )
|
|
||||||
{
|
|
||||||
wxPoint dragLastPoint(m_dragLastPos, m_dragLastPos);
|
|
||||||
dragLastPoint = CalcGridWindowScrolledPosition(dragLastPoint, gridWindow);
|
|
||||||
|
|
||||||
m_dragLastPos = doper.Select(dragLastPoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
// do resize the line
|
|
||||||
const int lineStart = oper.GetLineStartPos(this, m_dragRowOrCol);
|
const int lineStart = oper.GetLineStartPos(this, m_dragRowOrCol);
|
||||||
const int lineSizeOld = oper.GetLineSize(this, m_dragRowOrCol);
|
|
||||||
oper.SetLineSize(this, m_dragRowOrCol,
|
oper.SetLineSize(this, m_dragRowOrCol,
|
||||||
wxMax(m_dragLastPos - lineStart,
|
wxMax(linePos - lineStart,
|
||||||
oper.GetMinimalLineSize(this, m_dragRowOrCol)));
|
oper.GetMinimalLineSize(this, m_dragRowOrCol)));
|
||||||
const bool
|
|
||||||
sizeChanged = oper.GetLineSize(this, m_dragRowOrCol) != lineSizeOld;
|
|
||||||
|
|
||||||
m_dragLastPos = -1;
|
// TODO: generate RESIZING event, see #10754, if the size has changed.
|
||||||
|
|
||||||
// show the edit control back again
|
|
||||||
ShowCellEditControl();
|
|
||||||
|
|
||||||
return sizeChanged;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPoint wxGrid::GetPositionForResizeEvent(int width) const
|
wxPoint wxGrid::GetPositionForResizeEvent(int width) const
|
||||||
@@ -4746,30 +4648,30 @@ wxPoint wxGrid::GetPositionForResizeEvent(int width) const
|
|||||||
|
|
||||||
void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow* gridWindow)
|
void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow* gridWindow)
|
||||||
{
|
{
|
||||||
// TODO: generate RESIZING event, see #10754
|
DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow);
|
||||||
|
|
||||||
if ( DoEndDragResizeLine(wxGridRowOperations(), gridWindow) )
|
SendGridSizeEvent(wxEVT_GRID_ROW_SIZE, m_dragRowOrCol, -1, event);
|
||||||
SendGridSizeEvent(wxEVT_GRID_ROW_SIZE, m_dragRowOrCol, -1, event);
|
|
||||||
|
m_dragRowOrCol = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGrid::DoEndDragResizeCol(const wxMouseEvent& event, wxGridWindow* gridWindow)
|
void wxGrid::DoEndDragResizeCol(const wxMouseEvent& event, wxGridWindow* gridWindow)
|
||||||
{
|
{
|
||||||
// TODO: generate RESIZING event, see #10754
|
DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow);
|
||||||
|
|
||||||
if ( DoEndDragResizeLine(wxGridColumnOperations(), gridWindow) )
|
SendGridSizeEvent(wxEVT_GRID_COL_SIZE, -1, m_dragRowOrCol, event);
|
||||||
SendGridSizeEvent(wxEVT_GRID_COL_SIZE, -1, m_dragRowOrCol, event);
|
|
||||||
|
m_dragRowOrCol = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGrid::DoHeaderStartDragResizeCol(int col)
|
void wxGrid::DoHeaderStartDragResizeCol(int col)
|
||||||
{
|
{
|
||||||
m_dragRowOrCol = col;
|
DoStartResizeRowOrCol(col);
|
||||||
m_dragLastPos = -1;
|
|
||||||
DoHeaderDragResizeCol(GetColWidth(m_dragRowOrCol));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGrid::DoHeaderDragResizeCol(int width)
|
void wxGrid::DoHeaderDragResizeCol(int width)
|
||||||
{
|
{
|
||||||
DrawGridDragLine(GetPositionForResizeEvent(width),
|
DoGridDragResize(GetPositionForResizeEvent(width),
|
||||||
wxGridColumnOperations(),
|
wxGridColumnOperations(),
|
||||||
m_gridWin);
|
m_gridWin);
|
||||||
}
|
}
|
||||||
|
@@ -1144,10 +1144,7 @@ TEST_CASE_METHOD(GridTestCase, "Grid::ColumnMinWidth", "[grid]")
|
|||||||
sim.MouseUp();
|
sim.MouseUp();
|
||||||
wxYield();
|
wxYield();
|
||||||
|
|
||||||
if ( m_grid->IsUsingNativeHeader() )
|
CHECK(m_grid->GetColSize(0) == newminwidth);
|
||||||
CHECK(m_grid->GetColSize(0) == startwidth);
|
|
||||||
else
|
|
||||||
CHECK(m_grid->GetColSize(0) == newminwidth);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user