Curses:...ttonbox(3)

hey bestie πŸ’– welcome to the manual page for Curses:...ttonbox(3), brought to you by the User Contributed Perl Documentation. we're about to unpack Curses::UI::Radiobuttonbox, and it's lowkey iconic.

✨ NAME ✨

Curses::UI::Radiobuttonbox β€” create and manipulate radiobuttonbox widgets. that's the whole assignment, no cap πŸ’…

πŸ‘‘ CLASS HIERARCHY πŸ‘‘

okay so the family tree is giving old-school Perl royalty:

        Curses::UI::Widget
        Curses::UI::Searchable
           |
           +----Curses::UI::Listbox
                   |
                   +----Curses::UI::Radiobuttonbox

🌸 SYNOPSIS 🌸

here's the setup, bestie β€” copy the literal code exactly:

           use Curses::UI;
           my $cui = new Curses::UI;
           my $win = $cui->add('window_id', 'Window');

           my $radiobuttonbox = $win->add(
               'myradiobuttonbox', 'Radiobuttonbox',
               -values    => [1, 2, 3],
               -labels    => { 1 => 'One',
                               2 => 'Two',
                               3 => 'Three' },
           );

           $radiobuttonbox->focus();
           my $selected = $radiobuttonbox->get();

πŸ’– DESCRIPTION πŸ’–

Curses::UI::Radiobuttonbox is a widget that can be used to create a radiobutton listbox. Only one value can be selected at a time. it's giving β€œyou get one choice and one choice only” 😭. This kind of listbox looks somewhat like this:

 +----------+
 |< > One   |
 |<o> Two   |
 |< > Three |
 +----------+

A Radiobuttonbox is derived from Curses::UI::Listbox. the only special thing about this class is that the -radio option is forced to a true value. so for the usage of Curses::UI::Radiobuttonbox see Curses::UI::Listbox). (yes, that stray ) is in the original, and we're respecting the lore πŸ™ˆ)

πŸ¦‹ SEE ALSO πŸ¦‹

go check out Curses::UI, Curses::UI::Listbox, β€” yes, the trailing comma is part of the original vibe, iykyk 🫢

πŸŽ€ AUTHOR πŸŽ€

Copyright (c) 2001-2002 Maurice Makaay. All rights reserved.

Maintained by Marcus Thiesen (marcus@cpan.thiesenweb.de).

This package is free software and is provided "as is" without express or implied warranty. It may be used, redistributed and/or modified under the same terms as perl itself.


this page comes from perl v5.42.2, dated 2023-07-03, and the footer also says Curses:...ttonbox(3). stay slay, bestie πŸ’œβœ¨

πŸ“¦ where this page comes from