Skip to content

Instantly share code, notes, and snippets.

@komoto48g
Last active May 11, 2023 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save komoto48g/f87c5ee269166865b3d8fe2188dd8f75 to your computer and use it in GitHub Desktop.
Save komoto48g/f87c5ee269166865b3d8fe2188dd8f75 to your computer and use it in GitHub Desktop.
View Iconify using wx.html2 control
import wx
import wx.html2
source = """\
<html>
<head>
<script src="https://code.iconify.design/iconify-icon/1.0.1/iconify-icon.min.js">
</script>
</head>
<body>
<iconify-icon icon="svg-spinners:bars-scale" style="color: purple;" width="24"></iconify-icon>
<iconify-icon icon="svg-spinners:bars-rotate-fade" style="color: purple;" width="24"></iconify-icon>
<iconify-icon icon="openmoji:annoyed-face-with-tongue" width="32"></iconify-icon>
</body>
</html>
"""
class Frame(wx.Frame):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.browser = wx.html2.WebView.New(self)
self.browser.SetPage(source, baseUrl='')
if __name__ == "__main__":
app = wx.App()
frm = Frame(None)
frm.Show()
app.MainLoop()
@komoto48g
Copy link
Author

AGDRec_20230511_235438_clip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment