Comments (6)
No you cannot do that.
I investigated it at some point, but did not find a solution. It might be possible though.
from pywebview.
def delete():
gui_win = Tk()
gui_win.withdraw() # remove the main TK window only show message box
gui_win.iconbitmap('icon.ico')
msg = messagebox.askquestion("Message", "Are You Sure Delete Password \t")
if msg =='yes':
print("Delete data")
gui_win.destroy()
gui_win.mainloop()
from pywebview.
Why is this code related, @MominIqbal-1234 ?
from pywebview.
Since it's a desktop application, not a web application, integrating Tkinter should be straightforward. :)
import webview
from tkinter import *
from tkinter import messagebox
class Api():
def delete(self, value):
gui_win = Tk()
gui_win.withdraw() # remove the main TK window only show message box
msg = messagebox.askquestion("Message", "Are You Sure \t")
if msg =='yes':
print("Delete data")
gui_win.destroy()
gui_win.mainloop()
webview.create_window("Test", html="<button onclick='pywebview.api.delete(\"Woah dude!\")'>Delete</button>", js_api=Api())
webview.start()
from pywebview.
No you cannot do that.
I investigated it at some point, but did not find a solution. It might be possible though.
pywebview is a lightweight cross-platform wrapper around a webview component that allows to display HTML content in its own native GUI window. Here why use the native gui window to instead of tkinter frame?? As we know, tkinter is a lightweight cross-platform gui too. @r0x0r
from pywebview.
hi, I find a project tkwebview2 which is based on the pywebview, and display the content on the tkinter frame. @r0x0r @PanosHatz
from pywebview.
Related Issues (20)
- javascript print() not working with pywebview HOT 3
- There's a problem here HOT 2
- Modernize folderdialog? HOT 4
- [Feature] Message Box function HOT 5
- how Intercept and filter files or requests ? HOT 2
- `mypy` complains that `webview` doesn't have library stubs or `py.typed` marker HOT 1
- on Windows, create_file_dialog() is not disposing of dialog after ShowDialog() HOT 1
- Add `block` parameter to `webview.start` using multiprocessing HOT 11
- "pip install pywebview" doesn't work : sha hash error HOT 1
- Can't use multiple pywebviews at the same time HOT 7
- cant click on elements when `window.transparent` is true HOT 1
- pywebview headless window like selenium python HOT 5
- ModuleNotFoundError: No module named 'gi' HOT 2
- js_bridge_call: use logging instead of print() HOT 1
- "Merge Master to Docs on Release" workflow broken
- [Question] Embedded HTTP server on unix domain socket HOT 5
- Add feature "innerHTML" to Element class HOT 1
- getting a blank/empty window when trying to open a webpage HOT 6
- Drag and drop performance issue on more complex html pages. HOT 2
- Any way to toggle device emulation?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywebview.