Last active
May 11, 2023 15:31
-
-
Save komoto48g/f87c5ee269166865b3d8fe2188dd8f75 to your computer and use it in GitHub Desktop.
View Iconify using wx.html2 control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Author
komoto48g
commented
May 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment