Fl::ValueOutput - Displays Floating Point Value


The Fl::ValueOutput widget displays a floating point value.

If step() is not zero, the user can adjust the value by dragging the mouse left and right. The left button moves one step() per pixel, the middle by 10 * step(), and the right button by 100 * step().

This is much lighter-weight than Fl::ValueInput because it contains no text editing code or character buffer.


Fl::ValueOutput inherits from Fl::Valuator and Fl::Widget. On top of that, it exposes the following methods...


    my $val_a = Fl::ValueOutput->new(0, 0, 250, 500, 'Important Stuff');
    my $val_b = Fl::ValueOutput->new(0, 0, 250, 500);

The constructor creates a new widget using the given position, size, and label.

The default boxtype is FL_NO_BOX.

The destructor removes the widget.


    my $soft = $val_a->soft();
    $val_b->soft( 0 );

If "soft" is turned on, the user is allowed to drag the value outside the range.

If they drag the value to one of the ends, let go, then grab again and continue to drag, they can get to any value. Default is 1 (on).


Sets or gets the color of the text in the value box.

    my $color = $val_a->textcolor();


Sets or gets the typeface of the text in the value box.

    my $font = $val_a->textfont();

textsize( )

Gets the size of the text in the value box.

    my $size = $val_a->textsize();


Copyright (C) Sanko Robinson.

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


Sanko Robinson <>