Tk::Airports - A widget to select airports


Tk-Airports documentation  | view source Contained in the Tk-Airports distribution.

Index


NAME

Top

Tk::Airports - A widget to select airports

SYNOPSIS

Top

  use Tk;
  use Tk::Airports;

  my $mw = MainWindow->new();
  $airport = $mw->Airports(-title => 'AirportsWoldWide');
  my @return_values = $airport->Show();
  # or as one string
  my $return_value = $airport->Show();

WIDGET-SPECIFIC OPTIONS

Top

Name: selectMode
Class: SelectMode
Switch: -selectmode

Specifies one of several styles for manipulating the selection. The value of the option may be arbitrary, but the default bindings expect it to be either single, multiple or extended; the default value is single.

Name: font
Class: Font
Switch: -font

Specifies the font for the list of Airports. The default font is "Courier 8"

Name: title
Class: Title
Switch: -title

Specifies the title of the widget.

Name: order
Class: Order
Switch: -order

It is possible to change the order. The list can be ordered by Airport-Code (code) or by City-Name (city). The default value is code.

Name: filename
Class: Filename
Switch: -filename

Specifies a file that contains a user specific set of Airports

DESCRIPTION

Top

The Airports method creates a new window and shows a list of nearly all airports. The widget provides several functions:

Search for an airport with the entry at the top of the widget.

The return values are the codes for the airports. In list context a list with one code per element is returned, in scalar context a string is returned with "; " as delimiter.

WIDGET METHODS

Top

The Airports method creates a widget object. This object supports the configure and cget methods described in Tk::options which can be used to enquire and modify the options described above. The widget also inherits all the methods provided by the generic Tk::Widget class.

DEFAULT BINDINGS

Top

The following additional behavior is defined by the default bindings:

[1]

Start the search via <Return> in the Entry at the top of the widget.

[2]

Return the selected values via <Return> in the listbox.

[3]

Return one selected value via double-clicking the entry in the listbox.

BUGS

Top

Please contact me when you have found a bug.

ToDo

Top

*) translation of cities into national names *) allow other fonts *) option for specifying the return values (code,city,all) *) option for specifying the delimiter

document these methods:

Accept
Cancel
Populate
Show

AUTHOR

Top

Renee Baecker, <module@renee-baecker.de>

COPYRIGHT AND LICENSE

Top


Tk-Airports documentation  | view source Contained in the Tk-Airports distribution.