NAME
Tk::YANoteBook - Yet another NoteBook widget
SYNOPSIS
require Tk::YANoteBook;
my $nb = $window->YANoteBook(@options)->pack;
DESCRIPTION
A more flexible notebook widget. It does well in a multi document environment.
You can select any side where the tabs will be placed.
You can drag tabs with your mouse.
It has an overload if tabs won't fit any more.
You can specify a close button for a tab.
CONFIG VARIABLES
- Name: -backPageColor
- Class: -BackPageColor
- Switch: -backpagecolor
-
Background color for the tab frame.
- Switch: -closeimage
-
Image for the close button on each tab. Default value is the close_icon.xpm in this distribution.
- Switch: -closetabcall
-
Calback, called before a tab is closed. Shoud return a boolean value.
- Switch: -image
-
Image to be used for the more button. Default value none.
- Switch: -selectoptions
-
Configuring the selected tab. Default value [ -relief => 'raised' ].
- Switch: -selecttabcall
-
Calback, called when a tab is selected with the mouse.
- Switch: -tabside
-
Default value 'top'. Only available at create time. Can be top, left, bottom or right.
- Switch: -text
-
Text for the more button. Default value 'More'.
- Switch: -unselectoptions
-
Configuring the unselected tab. Default value [ -relief => 'flat'].
METHODS
- addPage($name, @options)
-
Adds a tab. You can specify following options:
-closebutton
Default is 0. If set a close button will be added to the tab.
-title
Text on the tab. If not set, it will be equal to $name.
-titleimg
Display an image instead of a text.
- deletePage($name)
-
Deletes $name. -closetabcall will be called in advance. That call should return 1 for the tab to be closed.
- getPage($name)
-
Returns the page frame object for $name.
- getTab($name)
-
Returns the tab object for $name.
- isDisplayed($name)
-
Returns true if $name is currently on display
- lastDisplayed
-
Returns the name of the last displayed tab.
- pageCount
-
Returns the number of pages
- pageExists($name)
-
Returns true if $name exists
- renamePage($old, $new)
-
Rename a page.
- selectPage($name)
-
Select page $name.
If $name is not displayed it is moved to the front of the displayed items.
- tabList
-
Returns a sorted list of all page names.
- tabPosition($name)
-
Returns the position on the tab frame of $name. Returns undef for undisplayed pages.
LICENSE
Same as Perl.
AUTHOR
Hans Jeuken (hanje at cpan dot org)
BUGS
Unknown. If you find any, please contact the author.