How-to guides¶
Task-oriented recipes for the NativeHTMLKit Python SDK 0.1.2. New to the SDK? Start with getting started and the todo tutorial. Exact signatures are in the API reference.
| Guide | You want to… |
|---|---|
| Application lifecycle | choose an entry point; quit, close and shutdown hooks |
| Events and callbacks | react to clicks and typing; delegate events; know which thread runs your code |
| Updating the page | change text, attributes and classes; render lists and tables; batch updates |
| Forms and validation | read form values, use HTML validation, add custom rules |
| Multiple windows and window state | open several windows, resize/rename them, veto closing |
| Native file dialogs | let the user open, save or choose a folder |
| HTML dialogs and popovers | show modal <dialog>s and popover elements |
| Clipboard and desktop services | copy/paste, open links and files, follow the desktop theme |
| Keyboard and focus | add shortcuts, keep Tab in an editor, move focus, edit the selection |
| Styling and layout | know which CSS works, lay out a window, light/dark mode, change styles at run time |
| Live bitmaps | draw charts or images from Python pixels |
| Background work | run slow or periodic work without freezing the window |
| Diagnostics and troubleshooting | find out why something does not happen; build an About/Support window |
| Packaging and distribution | ship an application to users |
| Project scaffolding | start a project with nativehtmlkit-new, grow and test it |
| Security | handle untrusted text, files and links safely |
Python-specific:
| Guide | You want to… |
|---|---|
| asyncio integration | write async callbacks and awaitable updates |
Every guide links to runnable applications; the full list is in examples/README.md.
Source: nativehtmlkit-python/docs/guides/README.md · edit the page there.