Skip to content

New experimental widgets and methods #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 68 commits into
base: experimental
Choose a base branch
from

Conversation

Zamy846692
Copy link
Contributor

@Zamy846692 Zamy846692 commented Mar 31, 2025

  • Added binding to TkHTML's URI parsing commands (yes it has those) to TkinterWeb along with two other experimental classes (ParsedURI and TkHtmlParseURL) those may not turn out to be of any practical use - I just added them because I didn't know with to do with the bindings. All instances of urllib.parse have been replaced with this.
  • TkinterWeb.search now accepts a variable number of non-keyword arguments (to allow "length")
  • Added TkinterWeb.get_child_text() - Gets text of node and all its descendants recursively
  • Replaced all DOM events in HTMLElement with DOM_element_events function that adds them automatically.
  • HTMLElement search methods no longer reference HTMLDocument search methods (they didn't work that way, I might try to fix this).
  • HTMLCollection is now live; it is automatically updated when the document is changed. Done using code inspired by HV3.
  • Added HTMLElement id and className in from Zamy846692-DOM-2
  • Added HtmlFrame.insert_html Parses HTML and adds it to the end (or start) of the current document. Unlike add_html, it returns the root node of rendered HTML.
  • Beautified HTML formatting in HtmlFrame.snapshot_page
  • Completely reworked HtmlLabel
  • Added brand new HtmlParse class, allows for parsing of HTML documents using TkinterWeb's DOM without actuality displaying anything.
    Ask if there are any changes you would like me to make!

Zamy846692 and others added 30 commits March 12, 2025 00:24
… and has 'text' as a configure option. Had to turn off __call__ for 'TkinterWeb' to allow Tkinter canvas widgets to load 'HtmlLabel', not sure what that might do in the long term.
…ely it will lag if you create a lot of them.
…om HTMLDocument but that seems to be the only way to do it and is how it is done in hv3_dom_core.tcl:482
@Andereoo
Copy link
Owner

Hello! Thank you for the changes. Would you kindy update your branch so it is up-to-date with this one? That way I can compare the changes inline. Thank you!

@Zamy846692
Copy link
Contributor Author

Which branches exactly?

@Andereoo
Copy link
Owner

Andereoo commented Apr 10, 2025 via email

@Zamy846692
Copy link
Contributor Author

Zamy846692 commented Apr 10, 2025

It says:

This branch has conflicts that must be resolved

But doesn't say what the conflicts are. All the branches are up to date

@Andereoo
Copy link
Owner

Andereoo commented Apr 10, 2025 via email

@Zamy846692
Copy link
Contributor Author

Zamy846692 commented Apr 11, 2025

Did it!
But it now says:

ModuleNotFoundError: No module named 'tkinterweb_tkhtml'

@Zamy846692 Zamy846692 force-pushed the mine branch 4 times, most recently from 6997fc8 to 1ed85f7 Compare April 29, 2025 20:23
# Conflicts:
#	tkinterweb/__init__.py
#	tkinterweb/bindings.py
#	tkinterweb/dom.py
#	tkinterweb/htmlwidgets.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants