- Added missing docstrings (line.set(), chart.hide(), chart.exit()).

- Updated chart.exit() to destroy objects and terminate the webview process.
- Fixed WxChart not expanding correctly and removed its width and height parameters.
- Fixed KeyboardInterrupt error message when using show(block=True).
This commit is contained in:
louisnw
2023-05-12 12:56:53 +01:00
parent 5b0a8cd51f
commit d8424d6da3
4 changed files with 39 additions and 12 deletions

View File

@ -6,9 +6,9 @@ except ImportError:
class WxChart(LWC):
def __init__(self, parent, width, height, volume_enabled=True):
def __init__(self, parent, volume_enabled=True):
super().__init__(volume_enabled)
self.webview = wx.html2.WebView.New(parent, size=(width, height))
self.webview = wx.html2.WebView.New(parent)
self.webview.Bind(wx.html2.EVT_WEBVIEW_LOADED, self._on_js_load)
self.webview.SetPage(self._html, '')