on this frame i set a panel of default position and default size.
i placed a grid to fill up the window and then set the column/row label sizes to 0.
added another panel on top of the first panel with a height thats just enough to fill where the col labels should go on the first grid. then i set another grid on this second panel that is the same width as the original grid, and a height thats proportional to "fill in" where the first grids col labels would be.
i have hidden the col labels of the second grid as well. this second grid acts as column labels.
both of the grids have a width of ~200 cells, each cell is 180 pixels in width.
the problem: the second grid that is placed on second panel, above the first grid, stops scrolling way before the first grid stops scrolling.
to fix this i have to manually force a resize event.
Code: Select all
package MyApp;
sub OnInit(
my $frame = MyFrame->new(
undef, -1, 'something interesting',
[ 0, 0 ],
[1100,500],
);
)
package MyFrame;
sub new(
my( $class ) = shift;
my( $this ) = $class->SUPER::new( @_ );
my $panel = Wx::Panel->new( $this, -1, wxDefaultPosition, wxDefaultSize);
my $panel2 = Wx::Panel->new( $panel, -1, [200, 10], [900, 41]);
my $grid = Wx::Grid->new($panel, -1, [ 200,50 ], [ 1100, 518 ]);
my $grid2 = Wx::Grid->new( $panel2, -1, [0, 0], [ 900, 60]);
$grid->SetDefaultColSize(180);
$grid2->SetDefaultColSize(180);
$grid->SetColLabelSize(0);
$grid2->SetColLabelSize(0);
my $cols = 200;
$grid->CreateGrid(1, $cols);
$grid2->CreateGrid(1, $cols);
#i have to force a size event to make the second grid ($grid2) scroll-able all the way to the end
$grid2->SetColSize(0, 180);
)
also, please do not pay to much attention to the sizes, what i am trying to accomplish is hiding the scrollbars, since there is no way to hide them and still have a scrollable window (that i know of)
if i can make it any more clear just let me know. i could make a short video of the problem. i spent 6-7 hours chasing this problem down.