i have a web browser made in python with menu.
in one menu i have cut copy paste but no functionality and i need to make them work. i need an example of class oncopy.(event menu)
Open file i manage to work like this .takes file and print on screen the link to that file but how can make open dialog to open a file at least one type of file?
if
filepathis the absolute pathname of the file you got from the opendialog, try:This will open your file with its corresponding windows application to which its extension is associated (like clicking twice in the file icon)
To copy a selected text in the HTML window, if you used:
then in your Frame or Panel subclass you create your instance of the browser object in the
__init__()method with:and bind the copy button onclick event with an ‘on_copy’ method.
Finally, you define the on_copy(self, event) method that should be triggered when you click the ‘copy’ button: