Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wxpython: wxgrid without vertical scrollbar

Tags:

wxpython

is posible remove the automatic horizontal scrollbar in a wxgrid?

like image 774
JuanPablo Avatar asked Jan 21 '23 15:01

JuanPablo


2 Answers

show horizontal, hide vertical scroll bar:

grid_object.ShowScrollbars(wx.SHOW_SB_DEFAULT,wx.SHOW_SB_NEVER)

hide horizontal and vertical scroll bar:

grid_object.ShowScrollbars(wx.SHOW_SB_NEVER,wx.SHOW_SB_NEVER)
like image 58
alwbtc Avatar answered Jan 23 '23 04:01

alwbtc


Unfortunately, no. As I found in the mailing archives from Robin Dunn, wx developer and wxPython creator/maintainer:

Although you can deactivate the scrollbars by using the wx.Window and wx.ScrolledWindow methods dealing with scrolling, the Grid class resets itself at various points and they just come back. So there really isn't any way to disable the scrollbars, other than making the window large enough that they are not needed.

reference

like image 28
Steven Sproat Avatar answered Jan 23 '23 03:01

Steven Sproat