The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

LibUI::Label - Non-interactive Text Display

SYNOPSIS

    use LibUI ':all';
    use LibUI::VBox;
    use LibUI::Window;
    use LibUI::Label;
    Init && die;
    my $window = LibUI::Window->new( 'Hi', 320, 100, 0 );
    $window->setMargined( 1 );
    my $box    = LibUI::VBox->new();
    my $lbl    = LibUI::Label->new('Hello, World');
    $box->append( $lbl, 1 );
    $window->setChild($box);
    $window->onClosing(
        sub {
            Quit();
            return 1;
        },
        undef
    );
    $window->show;
    Main();

DESCRIPTION

A LibUI::Label object represents a control that displays non-interactive text.

Functions

Not a lot here but... well, it's just a text label.

new( ... )

    my $lbl = LibUI::Label->new( 'Working...' );

Creates a new LibUI::Label.

Expected parameters include:

$text - label text

text( )

    my $title = $lbl->text( );

Returns the label text.

setText( ... )

    $lbl->setText( 'Complete' );

Sets the label text.

LICENSE

Copyright (C) Sanko Robinson.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Sanko Robinson <sanko@cpan.org>