entrybox(3tcl)

πŸ“¦
version 2.0~fs20200322.97fa62c Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing

πŸ’– entrybox β€” the manual, but make it cute πŸ’–

okay bestie, sit down, hydrate, because we're talking about entrybox, a whole widget from the Tk Themed Widget corner of the world. yes it's a manual page, no it does not have to be boring. let's go 🫢


✨ NAME ✨

entrybox β€” an editable text field widget, but with clear controls πŸ’…


✨ SYNOPSIS ✨

package require Tk  8.6.6

package require matchbox  1.0

so you need Tk at version 8.6.6 or better, and you need the matchbox package at version 1.0. that's the whole vibe check. βœ…


✨ DESCRIPTION ✨

The ttk::entrybox widget is literally just an extension of the regular ttk::entry widget. like, glow-up edition. 🌸

here's the slay part: you can drop it in wherever a ttk::entry is currently used, and you don't have to change any other part of your code. not one line. it just fits. periodt. πŸ‘‘

so what's the actual difference between ttk::entrybox and ttk::entry? it's all in the interaction with the user. ✨

  • An empty ttk::entrybox looks exactly like a ttk::entry. no cap, you cannot tell them apart.
  • But the moment there is any text in the ttk::entrybox, an icon appears on the right-hand side of the widget. πŸ¦‹
  • The user can click that icon to erase the text. one click, bye bye content. πŸ’€

it's giving "clear button but make it effortless." iconic behavior fr fr.


✨ WIDGET COMMAND ✨

A ttk::entrybox widget supports the same subcommands as a ttk::entry. like, all of them. nothing removed, nothing weird.

and as a lil convenience, there's one additional subcommand available:

  • pathName set value β€” directly sets the value of the ttk::entrybox to value, replacing any existing text. that's it. that's the whole thing. instant replacement, no drama. πŸ’–

✨ DEFAULT BINDINGS ✨

The ttk::entrybox has one additional key binding: Control-u. πŸŽ€

and what does it do? it also erases all text in the ttk::entrybox. same energy as clicking the little icon, just from the keyboard. your fingers stay on the keys, your text stays gone. πŸ’…


Copyright (c) 2017 Schelte Bron

like, respect the author bestie, they built this for us 🫢


ok and that's the whole page! entrybox is filed under the Tk Themed Widget manual, entrybox(3tcl), and this doc is at version 1.0. mwah, go clear some text fields, you main character πŸŒˆπŸ’œ
πŸ“¦ where this page comes from