I want to use Excel’s “freeze panes” feature in wxpython grid, since wxpython doesn’t have such a feature, I have created 2 grids, placed one on the top of the other using a horizontal sizer. Now I have the following view:
Since grids width are too big, both have horizontal scrollbars. Now, I want to remove grid 1’s scrollbar, and I want grid1 to be scrolled in sync with grid 2. That is, when I scroll grid 2 to the right, grid 1 should be synchronously scrolled to the right with grid 2 (that way I am freezing panes). New view should be like:
My questions:
1- Is it a good strategy to get the “freeze panes” feature in wxpython? If not, what is the most convenient way?
2- Is it possible to remove the scrollbar of grid 1?
3- Is it possible to scroll grid 1 and grid 2 synchronously?
Images in my orginal post were not shown, the images are above
···
On Thursday, December 19, 2013 8:09:13 PM UTC+2, steve wrote:
I want to use Excel’s “freeze panes” feature in wxpython grid, since wxpython doesn’t have such a feature, I have created 2 grids, placed one on the top of the other using a horizontal sizer. Now I have the following view:
Since grids width are too big, both have horizontal scrollbars. Now, I want to remove grid 1’s scrollbar, and I want grid1 to be scrolled in sync with grid 2. That is, when I scroll grid 2 to the right, grid 1 should be synchronously scrolled to the right with grid 2 (that way I am freezing panes). New view should be like:
My questions:
1- Is it a good strategy to get the “freeze panes” feature in wxpython? If not, what is the most convenient way?
2- Is it possible to remove the scrollbar of grid 1?
3- Is it possible to scroll grid 1 and grid 2 synchronously?
On Thu, 19 Dec 2013 19:09:13 +0100, steve <oslocourse@gmail.com> wrote:
I want to use Excel's "freeze panes" feature in wxpython grid, since
wxpython doesn't have such a feature, I have created 2 grids, placed one
on the top of the other using a horizontal sizer. Now I have the following
view:
Since grids width are too big, both have horizontal scrollbars. Now, I want
to remove grid 1's scrollbar, and I want grid1 to be scrolled in sync with
grid 2. That is, when I scroll grid 2 to the right, grid 1 should be
synchronously scrolled to the right with grid 2 (that way I am freezing
panes). New view should be like:
My questions:
1- Is it a good strategy to get the "freeze panes" feature in wxpython? If
not, what is the most convenient way?
2- Is it possible to remove the scrollbar of grid 1?
3- Is it possible to scroll grid 1 and grid 2 synchronously?
@Michael Ross what do you mean by scrolling the pane instead? Will both grids be scrolled to right? How do you scroll the pane instead of scroll the 2 grid?
···
On Thursday, December 19, 2013 8:40:10 PM UTC+2, Michael Ross wrote:
The wx.Window class has various methods of scrolling the window/ changing the scrollbar attrs depending on what you want to do.
These are usually used when you want to programatically change the scrollbars in some way. Ex: Not using the mouse or maybe when an event is called.
Lets say… Maybe I want to bind EVT_MOUSEWHEEL to grid one/two and depending on the wheel direction, I could for example handle Horizontal sincronized scrolling for both grids at once, similar to most diff viewers.
I could handle something like that in the mousewheel event.
Or maybe when the grids are shown/hidden, you could set the scrollbars to a certain position. etc.
Many possibilities here depending on what end behavior you want.
Search for methods with “Scroll” in them in the wx.Window class docs and also look at the ones in wx.ScrollBar to get an idea of what you can do.
···
On Thursday, December 19, 2013 12:54:43 PM UTC-6, steve wrote:
@Michael Ross what do you mean by scrolling the pane instead? Will both grids be scrolled to right? How do you scroll the pane instead of scroll the 2 grid?
On Thursday, December 19, 2013 6:09:13 PM UTC, steve wrote:
I want to use Excel’s “freeze panes” feature in wxpython grid, since wxpython doesn’t have such a feature, I have created 2 grids, placed one on the top of the other using a horizontal sizer. Now I have the following view:
Since grids width are too big, both have horizontal scrollbars. Now, I want to remove grid 1’s scrollbar, and I want grid1 to be scrolled in sync with grid 2. That is, when I scroll grid 2 to the right, grid 1 should be synchronously scrolled to the right with grid 2 (that way I am freezing panes). New view should be like:
My questions:
1- Is it a good strategy to get the “freeze panes” feature in wxpython? If not, what is the most convenient way?
2- Is it possible to remove the scrollbar of grid 1?
3- Is it possible to scroll grid 1 and grid 2 synchronously?