The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Label Widget

$label=Paw::Label-new($text, [$color], [$name]);>

Example

     $label=Paw::Label->new(text=>"Text", color=>3, name=>"Linux_Label");

Parameter

     text  => Text of the label

     color => The colorpair must be generated with
              Curses::init_pair(pair_nr, COLOR_fg, COLOR_bg)
              [optionally]

     name  => Name of the widget [optionally]

set_text($text)

Change the text of the label to the string $text.

Example

     $label->set_text("changed label text");

get_text();

returns the label-text.

Example

     $text=$label->get_text();

abs_move_widget($new_x, $new_y)

the widget moves to the new absolute screen position. if you set only one of the two parameters, the other one keeps the old value.

Example

     $label->abs_move_widget( new_x=>5 );      #y-pos is the same

get_widget_pos()

returns an array of two values, the x-position and the y-position of the widget.

Example

     ($xpos,$ypos)=$label->get_widget_pos();

set_color($color_pair)

Set a new color_pair for the widget.

Example

     $box->set_color(3);

set_border(["shade"])

activates the border of the widget (optionally also with shadows).

Example

     $widget->set_border("shade"); or $widget->set_border();