| Tk-WidgetDump documentation | view source | Contained in the Tk-WidgetDump distribution. |
Tk::WidgetDump - dump the widget hierarchie
In a script:
use Tk::WidgetDump; # optional
$mw = new MainWindow;
$mw->WidgetDump; # usually before MainLoop
From the command line for a quick widget option test:
perl -MTk -MTk::WidgetDump -e '$mw=tkinit; $mw->Button->pack; $mw->WidgetDump; MainLoop'
Tk::WidgetDump helps in debugging Perl/Tk applications. By calling
the WidgetDump method, a new toplevel with the widget hierarchie
will be displayed. The hierarchie can always be refreshed by the
Refresh button (e.g. if new widgets are added after calling the
WidgetDump method).
By double-clicking on a widget entry, the widget flashes and a new toplevel is opened containing the configuration options of the widget. It also displays other characteristics of the widget like children and parent widgets, size, position, geometry management and server parameters. Configuration values can also be changed on the fly. Furthermore it is possible:
If you want to call widget methods, you have to enter the method name with arguments only, e.g. (for creating a line on a canvas):
createLine(0,0,100,100)
Because WidgetDump is a pseudo widget, it cannot be configured
itself.
Changes are not reflected in the configuration window, you have to hit the "Refresh" button.
Slaven Rezic (srezic@cpan.org)
Tk(3).
| Tk-WidgetDump documentation | view source | Contained in the Tk-WidgetDump distribution. |