Opened 12 months ago

Closed 9 months ago

#15627 closed defect (fixed)

wxGrid autosize column with doubleclick ignore minimum size

Reported by: pscamodio Owned by: vadz
Priority: normal Milestone: 3.0.1
Component: wxGrid Version: stable-latest
Keywords: wxGrid column size autosize Cc:
Blocked By: Blocking:
Patch: no

Description

I've here the minimal code thath show the problem

wxFrame *frame = new wxFrame(nullptr, wxID_ANY, L"frame");
wxGrid *grid = new wxGrid(frame, wxID_ANY);
grid->CreateGrid(2, 2);
grid->SetColMinimalWidth(0, 400);
frame->Show();

If i do a doubleclick on the edge of a column label the autoresize
ignore the minimal width and resize the column only in respect of the header.

I think that the autoresize have to respect the minimal width.

Change History (4)

comment:1 Changed 10 months ago by vadz

  • Owner set to vadz
  • Status changed from new to accepted

Yes, this is wrong (apparently at least since r54514), I'll fix this, thanks for reporting.

comment:2 Changed 10 months ago by VZ

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [75446]) Prevent wxGrid rows/columns from becoming too small on double click.

The minimal size wasn't respected when auto-sizing rows/columns in
Set{Row,Col}Size() which was called in response to double clicking the
separator line, which resulted in clearly wrong behaviour as the user was
prevented from resizing the row/column to a smaller size by dragging them but
not by double clicking, so fix this to respect the minimal size as well.

Closes #15627.

comment:3 Changed 10 months ago by vadz

  • Milestone set to 3.0.1
  • Resolution changed from fixed to port to stable
  • Status changed from closed to portneeded

This could be backported to 3.0.x if no problems are found.

comment:4 Changed 9 months ago by VZ

  • Resolution changed from port to stable to fixed
  • Status changed from portneeded to closed

(In [75766]) Prevent wxGrid rows/columns from becoming too small on double click.

The minimal size wasn't respected when auto-sizing rows/columns in
Set{Row,Col}Size() which was called in response to double clicking the
separator line, which resulted in clearly wrong behaviour as the user was
prevented from resizing the row/column to a smaller size by dragging them but
not by double clicking, so fix this to respect the minimal size as well.

Closes #15627.

Note: See TracTickets for help on using tickets.