Frank Millman wrote:
>
> Now 2.5.1.5 will not allow me to specify a column width of less than 15.
Any
> attempt to do so results in a column with the default width of 80.
>
> Platforms are W2K and GTK1 (RedHat 9).
>
Robin Dunn wrote:
The following code was added to wxGrid::SetColSize so it ignores
attempts to resize smaller than the minimum (default 15). This applies
to resizing with the mouse too.
// This test then fixes sf.net bug #645734
if ( width < GetColMinimalAcceptableWidth()) { return; }
You can call SetColMinimalAcceptableWidth(0) to set the minimum to zero.
Thanks for the info, Robin.
In fact, while I was waiting for your reply, I changed my program so that I
do not create grid columns at all for columns that I want to be invisible.
It wasn't too hard - I use a dictionary to translate between columns in my
tablebase and columns in the grid when responding to GetCellValue and
SetCellValue.
This has solved a problem that I had before - I could not prevent a user
from resizing the invisible column with the mouse, and making it visible! I
looked for a function to disable resizing for a particular column, or the
ability to veto the resize event, but I could not find anything.
I came across one other minor glitch with 2.5.1.5, but I have a solution so
I did not need to post anything. It was not a bug, just a change in
behaviour. For the record, here it is.
Frame A creates frame B, with A as parent. Frame B creates frame C, with
Frame A as parent. I could not give C a parent of B, as C is not dependant
on B, so B might get destroyed, but I did not want C to get destroyed as
well. (A is the controlling frame, B is a menu, C is a function selected
from the menu. The user can return to the menu, move around the menu system,
and select another function without closing the original function).
With 2.4.2.4, under both W2K and GTK, if frame C is destroyed, focus returns
to Frame B. With 2.5.1.5, GTK behaves the same, but with W2K focus returns
to Frame A, so you have to click on Frame B before you can continue.
Once I had identified the problem, the solution was simple. I now give Frame
C a parent of None, and it works fine.
Thanks again, Robin.
Frank