Hi !
I have a small problem with wx.Grid and scrollbars.
Scrollbars definitively dissapears after resizing the frame.
Thx for help
#----------------------------------------------------------------------
import wx,wx.grid
#----------------------------------------------------------------------
class MainWindow(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,wx.ID_ANY,title)
#--
self.grid= wx.grid.Grid(id=wx.ID_ANY,parent=self)
self.grid.CreateGrid(numRows=10,numCols=2)
self.grid.Fit()
self.Fit()
#--
self.Show(1)
#----------------------------------------------------------------------
app = wx.PySimpleApp()
frame=MainWindow(None,-1,'Grid sizer')
app.MainLoop()
del app 4 2533
On Mar 26, 10:20 am, BH <B...@bh.comwrote:
Hi !
I have a small problem with wx.Grid and scrollbars.
Scrollbars definitively dissapears after resizing the frame.
Thx for help
#----------------------------------------------------------------------
import wx,wx.grid
#----------------------------------------------------------------------
class MainWindow(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,wx.ID_ANY,title)
#--
self.grid= wx.grid.Grid(id=wx.ID_ANY,parent=self)
self.grid.CreateGrid(numRows=10,numCols=2)
self.grid.Fit()
self.Fit()
#--
self.Show(1)
#----------------------------------------------------------------------
app = wx.PySimpleApp()
frame=MainWindow(None,-1,'Grid sizer')
app.MainLoop()
del app
If I understand this correctly, that is normal. Your grid is only two
columns by 10 rows, so if you resize your frame so that it shows all
rows and columns, the scroll bars will disappear, much like other
apps, such as FireFox. If you enlarge the frame enough, the scrollbars
go away.
Mike
Yes, absolutely, but try to minimize it, and the scrollbars stays hidden !!! ky******@gmail.com a écrit :
On Mar 26, 10:20 am, BH <B...@bh.comwrote:
>Hi !
I have a small problem with wx.Grid and scrollbars. Scrollbars definitively dissapears after resizing the frame.
Thx for help
#---------------------------------------------------------------------- import wx,wx.grid #---------------------------------------------------------------------- class MainWindow(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,wx.ID_ANY,title) #-- self.grid= wx.grid.Grid(id=wx.ID_ANY,parent=self) self.grid.CreateGrid(numRows=10,numCols=2) self.grid.Fit() self.Fit() #-- self.Show(1) #---------------------------------------------------------------------- app = wx.PySimpleApp() frame=MainWindow(None,-1,'Grid sizer') app.MainLoop() del app
If I understand this correctly, that is normal. Your grid is only two
columns by 10 rows, so if you resize your frame so that it shows all
rows and columns, the scroll bars will disappear, much like other
apps, such as FireFox. If you enlarge the frame enough, the scrollbars
go away.
Mike
On Mar 26, 11:30 am, BH <B...@bh.comwrote:
Yes, absolutely, but try to minimize it, and the scrollbars stays hidden !!!
kyoso...@gmail.com a écrit :
On Mar 26, 10:20 am, BH <B...@bh.comwrote:
Hi !
I have a small problem with wx.Grid and scrollbars.
Scrollbars definitively dissapears after resizing the frame.
Thx for help
#----------------------------------------------------------------------
import wx,wx.grid
#----------------------------------------------------------------------
class MainWindow(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,wx.ID_ANY,title)
#--
self.grid= wx.grid.Grid(id=wx.ID_ANY,parent=self)
self.grid.CreateGrid(numRows=10,numCols=2)
self.grid.Fit()
self.Fit()
#--
self.Show(1)
#----------------------------------------------------------------------
app = wx.PySimpleApp()
frame=MainWindow(None,-1,'Grid sizer')
app.MainLoop()
del app
If I understand this correctly, that is normal. Your grid is only two
columns by 10 rows, so if you resize your frame so that it shows all
rows and columns, the scroll bars will disappear, much like other
apps, such as FireFox. If you enlarge the frame enough, the scrollbars
go away.
Mike
The code you posted works for me. I am using Windows XP Pro, Python
2.4, wxPython 2.8. When I enlarge it, the scrollbars go away and when
I shrink it down, the scrollbars reappear. I tried using sizers, but
that seemed to cause problems.
I highly recommend that you post your questions about wxPython to the
wxPython users group. They have many talented and knowledgeable people
there. See http://wxpython.org/maillist.php
Mike
On 26 mar, 20:58, kyoso...@gmail.com wrote:
On Mar 26, 11:30 am, BH <B...@bh.comwrote:
Yes, absolutely, but try to minimize it, and the scrollbars stays hidden !!!
kyoso...@gmail.com a écrit :
On Mar 26, 10:20 am, BH <B...@bh.comwrote:
>Hi !
>I have a small problem with wx.Grid and scrollbars.
>Scrollbars definitively dissapears after resizing the frame.
>Thx for help
>#----------------------------------------------------------------------
>import wx,wx.grid
>#----------------------------------------------------------------------
>class MainWindow(wx.Frame):
> def __init__(self,parent,id,title):
> wx.Frame.__init__(self,parent,wx.ID_ANY,title)
> #--
> self.grid= wx.grid.Grid(id=wx.ID_ANY,parent=self)
> self.grid.CreateGrid(numRows=10,numCols=2)
> self.grid.Fit()
> self.Fit()
> #--
> self.Show(1)
>#----------------------------------------------------------------------
>app = wx.PySimpleApp()
>frame=MainWindow(None,-1,'Grid sizer')
>app.MainLoop()
>del app
If I understand this correctly, that is normal. Your grid is only two
columns by 10 rows, so if you resize your frame so that it shows all
rows and columns, the scroll bars will disappear, much like other
apps, such as FireFox. If you enlarge the frame enough, the scrollbars
go away.
Mike
The code you posted works for me. I am using Windows XP Pro, Python
2.4, wxPython 2.8. When I enlarge it, the scrollbars go away and when
I shrink it down, the scrollbars reappear. I tried using sizers, but
that seemed to cause problems.
I highly recommend that you post your questions about wxPython to the
wxPython users group. They have many talented and knowledgeable people
there. Seehttp://wxpython.org/maillist.php
Mike
OK, Thx I will have a look.
FYI The scrollbars definitively dissapears under Linux too ! (for me)
Best regards,
Bertrand This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: dimitri pater |
last post by:
Hello,
To be honest, I also posted this on the wxPython mailing list. But I
thought maybe some of you on the python list can help me...
I am trying to refresh a pane of a notebook that contains...
|
by: Richard Lewis |
last post by:
Hi there,
I've got a tree control in Tkinter (using the ESRF Tree module) but I
can't get it to layout how I want it.
I'd like to have it so that it streches north/south (anchored to the top...
|
by: Jordan O'Hare |
last post by:
Hello Everyone,
I am after some help with the following:
I have a windows application that contains a list box and
two data grids. All three controls are binded to a dataset
that contains...
|
by: Carlos Lozano |
last post by:
Hello Folks!
I have a grid that populates from a table on SQL Server. All datetime with
DBNull value show 1/1/1900 12:00AM ... Instead of just blank ("").
I found a document with the following...
|
by: John Wilson |
last post by:
My app produces some long datatables to display in a grid. So I put them in
a div so users can scroll. But the grid headers scroll out of view. I would
like to stop them doing this. Can I fix them...
|
by: phil-news-nospam |
last post by:
Is there really any advantage to using DIV elements with float style
properies, vs. the old method of TABLE and TR and TD?
I'm finding that by using DIV, it still involves the same number of...
|
by: BH |
last post by:
Hi,
I am trying to build my own IHM with two treeCtrl and 1 grid, based on
the wx.aui demos.
My problem is with the Grid. It dosen't have scrollbars.
I tried many methods (fit) but it always...
|
by: skanemupp |
last post by:
so my little calculator works perfectly now. just having some trouble
with the layout.
this whole tkinter-thing seems to be more tricky than it should be.
how can i make the 4 column of buttons...
|
by: Francesco Bochicchio |
last post by:
Il Mon, 18 Aug 2008 12:15:10 +0100, dudeja.rajat ha scritto:
Uhm, I don't think you should use the grid manager to obtain a window
like that. The grid manager is for equally distributing...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |