NumEntry(3pm)

πŸ’– NAME πŸ’–

Tk::NumEntry β€” a numeric Entry widget that comes with inc. & dec. buttons, bestie. it's giving ✨spinbox but make it Tk✨


πŸ¦‹ SYNOPSIS πŸ¦‹

use Tk::NumEntry;

$parent->NumEntry(?-option=>value, ...?);

🌸 DESCRIPTION 🌸

okay so Tk::NumEntry is literally a widget for typing in integer numbers. and it doesn't just sit there looking cute β€” it also has buttons for increment and decrement, so you can bump the number up or down without touching your keyboard. iconic behavior tbh πŸ’…

Tk::NumEntry supports all the options and methods that the plain NumEntry widget provides (go look at Tk::NumEntryPlain, iykyk), plus the following options:


⭐ STANDARD OPTIONS ⭐

besides the standard options of the Entry widget, NumEntry also supports:

  • -orient
  • -repeatdelay
  • -repeatinterval

the -orient option specifies the packing order of the increment and decrement buttons. and listen β€” this one can only be set at creation time. no takebacksies, periodt. πŸŽ€


πŸ‘‘ WIDGET-SPECIFIC OPTIONS πŸ‘‘

  • Name: buttons
  • Class: Buttons
  • Switch: -buttons
  • Fallback: 1

a Boolean that defines if the inc and dec buttons are visible. πŸ‘€


  • Switch: -readonly
  • Fallback: 0

if -readonly is set to a true value, then the value can only be changed by pressing the increment/decrement buttons. and bestie, same as before: this option can only be set at creation time. 🚫⌨️


🧚 WIDGET METHODS 🧚

subclasses of NumEntry may override the following methods to use different widgets for the composition of the NumEntry. these are:

  • NumEntryPlainWidget (usually "NumEntryPlain")
  • FireButtonWidget (usually "FireButton")
  • IncFireButtonWidget
  • DecFireButtonWidget

FireButtonWidget is used if IncFireButtonWidget or DecFireButtonWidget are not defined.


πŸ’œ AUTHOR πŸ’œ

Graham Barr <gbarr@pobox.com>

current maintainer is Slaven Rezic <slaven@rezic.de>. 🫢


🌈 ACKNOWLEDGEMENTS 🌈

I would to thank Achim Bohnet <ach@mpe.mpg.de> for all the feedback and testing. and for the splitting of the original Tk::NumEntry into Tk::FireButton, Tk::NumEntryPlain and Tk::NumEntry. a real one fr fr πŸ’–


Copyright (c) 1997-1998 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

except the typo's, they blong to Achim :-) πŸ’€

and that's the whole page, bestie β€” brought to you by perl v5.32.1, dated 2021-11-06, and it lives in the manual as NumEntry(3pm). slay, go write some widgets 🌟

πŸ“¦ where this page comes from