NAME

tkShortcuts - Several shortcuts for Tk.

SYNOPSIS

  use TkShortcuts1; 
  # then you call its methods. 

DESCRIPTION

This module contains some alternative Tk dialogs that you can use, that, in my opinion are more beneficial for the end user than some of the stuff that is packaged with Tk as well as two other Tk shortcuts that will make your life a lot easier. This module is very easy to use.

---

METHODS:

1.

superdirchoose()

This method returns a chosen directory that the user will chose.

Example:

my $dir = superdichoose();

2.

superopenfile()

This method returns the contents of a file that the user selects to open. It returns it as an array.

Example:

my @filecontents = superopenfile();

3.

saveit()

This is a method for creating a save file dialog. It takes two arguments. The first is a scalar which is the filename of the file to be saved. The second is an array of its contents. The method does not return anything.

Example:

saveit ($filname, @contentsoffilename);

4.

returntext()

This method sets up a dialog where the user can type in text in a big text entry box and then that text is returned. The method takes two arguments, two scalars. The first is av string for the window title and the second is a string for the text on the button on the bottom of the window used to return the text.

Example:

my @text = returntext ("Save Text", "Save Text");

5.

htmlcolret

This method returns a hex number for various html colors color coded buttons.

Example:

my $htmlcolor = htmlcolret();

---

All of the methods for this have the variable for their MainWindow() exported.

For superdirchoose the variable is: $superdirwin For superopenfile: $win_openfile For saveit: $w For returntext: $rett_win For htmlcolret: $htmlwin

The variable as is also exported and set to 0. Giving it a true value will force saveit to be a "save as..." dialog box instead of a "save" one.

SEE ALSO

See also Tk! It rocks.

check me out @ www.infusedlight.net

AUTHOR

Robin Bank, webmaster@infusedlight.net

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Robin Bank

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.