WidgetDemo(3pm)

πŸ’– WidgetDemo(3pm) πŸ’–

okay bestie, welcome to Tk::WidgetDemo β€” it's a Perl module from the User Contributed Perl Documentation crew, and it is literally here to serve you a standard widget demonstration window. periodt. πŸŽ€


✨ NAME ✨

Tk::WidgetDemo β€” create a standard widget demonstration window. it's giving "here's the demo, here's the code, go off." πŸ‘‘


🌸 SYNOPSIS 🌸

use WidgetDemo;
my $TOP = $MW->WidgetDemo(
    -name             => $demo,
    -text             => 'Learn how to write a widget demonstration!',
    -title            => 'WidgetDemo Demonstration',
    -iconname         => 'WidgetDemo',
    -geometry_manager => 'grid',
    -font             => $FONT,
);

no cap, that's the whole vibe right there. πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

This constructor builds a standard widget demonstration window, bestie, and it's composed of three frames. iconic structure, honestly:

  • the top frame holds the descriptive demonstration text πŸ“
  • the bottom frame holds the "Dismiss" and "See Code" buttons πŸ”˜
  • the middle frame is the demonstration container, which can be managed by either the pack or grid geometry manager 🧚

The -text attribute gets supplied to a Label widget, and that Label is left-adjusted with -wraplength set to 4 inches. πŸ“

If you require different specifications, then bestie, just pass an array to -text instead β€” the first element is the text string, and the remaining array elements are standard Label widget attributes. WidgetDemo will rearrange things as required. (yes, the original really does end that sentence with two periods. we respect the two periods. .. πŸ’€)

-text => ['Hello World!', qw/-wraplength 6i/],

🌈 AUTHOR 🌈

Steve Lidie <Stephen.O.Lidie@Lehigh.EDU> 🫢


πŸ“œ HISTORY πŸ“œ

lusol@Lehigh.EDU, LUCC, 97/02/11 lusol@Lehigh.EDU, LUCC, 97/06/07 Stephen.O.Lidie@Lehigh.EDU, LUCC, 97/06/07

  • Add Delegates() call that obviates the need for Top(). Many thanks to Achim Bohnet for this patch. πŸ™
  • Fix -title so that it works. πŸ”§

Copyright (C) 1997 - 1998 Stephen O. Lidie. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


fr fr, that's the whole page. go build a demo window, you absolute icon. πŸ’œ

and that's the sign-off bestie β€” this was perl v5.40.1, dated 2025-04-13, living its life as WidgetDemo(3pm). mwah. πŸ’‹βœ¨

πŸ“¦ where this page comes from