I have a situation where in i need to load "html" source in wxPython Panel in MAC.
Similar code I am pasting below.
This works perfectly fine: (Loads on Wx.Frame)
class Try_Webkit(wx.Frame): def init(self, parent, id, title): wx.Frame.init(self, parent, id, title)
sizer = wx.BoxSizer(wx.VERTICAL)
content_box = wx.BoxSizer(wx.VERTICAL)
webkit = wx.webkit.WebKitCtrl(self, -1)
webkit.SetPageSource(source)
self.Show(True)
This below code isn't working (with wx.Panel, Nothing will be loaded, looks blank page)
class Try_Webkit(wx.Frame): def init(self, parent, id, title): wx.Frame.init(self, parent, id, title)
panel = wx.Panel(self)
sizer = wx.BoxSizer(wx.VERTICAL)
content_box = wx.BoxSizer(wx.VERTICAL)
webkit = wx.webkit.WebKitCtrl(panel, -1)
webkit.SetPageSource(source)
self.Show(True)
WxPython Version: 2.8.11.0 MAC : El Capitan 10.11.3
How can I load html source into Panel?