IconList(3pm)
π IconList β Tk::IconList π
okay bestie, so likeβ¦ this is Tk::IconList, an icon list widget. it's a little canvas full of icons and labels and you get to click around in it. no cap, it's giving "file browser but make it a widget". π
β¨ SYNOPSIS β¨
use Tk::IconList;
$il = $mw->IconList(-browsecmd => sub { ... },
-command => sub { ... })->pack;
$il->Add($icon1, $text1);
$il->Add($icon2, $text2);
$il->Arrange;
...
$il->DeleteAll;
literally that's it. build it, add icons, arrange, go feral. π¦
πΈ DESCRIPTION πΈ
π OPTIONS
-browsecmdβ the browse callback, iykyk π«Ά-commandβ the main callback that fires when stuff happens-fontβ the font, bestie π-item -foreground|-fgβ the item foreground /-fgsituation
π§ METHODS
DeleteAllβ deletes every single item inside the canvas subwidget AND resets the IconList's state. full clean slate energy. β¨Add($image, $text)β adds an icon into the IconList with the designated image and text. drop it in, slay. πArrangeβ places the icons in a column-major arrangement. yes, column-major, we're being specific about it. πGetβ returns the selected item. that's the whole thing. it just tells you what's selected. πInvokeβ gets called when the user invokes the IconList (usually by double-clicking or pressing theReturnkey). this one's an internal method, so like, it's not for you, bestie, it's for the widget itself. πSee($tag)β if the item is not (completely) visible, scroll the canvas so that it becomes visible. also an internal method ngl. π
π COPYRIGHT π
the original tkfbox.tcl from Tcl/Tk is:
Copyright (c) 1994-1996 Sun Microsystems, Inc.
see the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. (yes, ALL of them. read the file, bestie, it's important π)
translated to Perl/Tk by Slaven Rezic <srezic@cpan.org>. iconic behavior honestly π«Ά
π₯ SEE ALSO π₯
- Tk::FBox β go look at it, it's right there π
and that's the whole page, periodt π this lil doc is from perl v5.40.1, dated 2025-04-13. mwah, go build something cute with it β¨ππ¦π
π¦ where this page comes from
- debian trixie: perl-tk 1:804.036+dfsg1-5
- ubuntu questing: perl-tk 1:804.036+dfsg1-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms