I've read almost all i could find on internet to solve this, but no way to find out !
so i will post here. I would like my news to have a vertical scrollbar in the gridbagsizer.
I tried to put it on wxscrolledWindow and many other things, there's no way to get this VScroll !!!
Maybe i should attach it to gridbagsizer but i don't know how to...
Here's an example of my problem :
import wx
import wx.html2
from os import getcwd
import wx.media
class MyFrame(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, None, id, u"PC GAMES Updater/Launcher V2.0 By -Fawn-", wx.DefaultPosition, wx.Size(1280, 650),style=wx.MINIMIZE_BOX|wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX)
ImgDir = (getcwd()+u"\\img\\fond.jpg")
fond = wx.Image(ImgDir, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
self.bg = wx.StaticBitmap(self, -1, fond)
self.browser = wx.html2.WebView.New(self.bg,-1,size=(370,200))
self.browser.LoadURL("http://utrem.tf/www/news.html")
#Sizer news
gbox7 = wx.GridBagSizer(1,1)
gbox7.SetEmptyCellSize((10,10))
gbox7.Add(self.browser,(0,0))
#NEWS
box7= wx.StaticBox(self, -1, "NEWS")
bsizer7 = wx.StaticBoxSizer(box7, wx.HORIZONTAL)
sizerH7 = wx.BoxSizer(wx.VERTICAL)
sizerH7.Add(gbox7, 0, wx.ALL|wx.CENTER, 10)
bsizer7.Add(sizerH7, 1, wx.EXPAND, 0)
vSizer3 = wx.BoxSizer(wx.VERTICAL,)
vSizer3.Add(bsizer7, 0,wx.ALL|wx.EXPAND, 10)
hmainSizer=wx.BoxSizer(wx.HORIZONTAL)
hmainSizer.Add(vSizer3, 0,wx.ALL|wx.EXPAND, 10)
vmainSizer=wx.BoxSizer(wx.VERTICAL)
vmainSizer.Add(hmainSizer, 0,wx.ALL|wx.EXPAND, 10)
self.SetSizer(vmainSizer)
class MyApp(wx.App):
def OnInit(self):
frame = MyFrame(None, -1, None)
frame.Show(True)
frame.Centre()
return True
if __name__=='__main__':
app = MyApp(0)
app.MainLoop()
PS: I must keep my "news" size (370,200) !
Thanks if someone can help and explain what i am doing wrong.