Fl::Counter - Controls a Single Floating Point Value with Button or Keyboard Arrows


The Fl::Counter controls a single floating point value with button (or keyboard) arrows. Double arrows buttons achieve larger steps than simple arrows.

The type of an Fl::Counter object can be set using type(...) to:

FL_NORMAL_COUNTER: Displays a counter with 4 arrow buttons.
FL_SIMPLE_COUNTER: Displays a counter with only 2 arrow buttons.


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


    my $count_a = Fl::Counter->new(0, 0, 250, 500, 'Important Stuff');
    my $count_b = Fl::Counter->new(0, 0, 250, 500);

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

The default type is FL_NORMAL_COUNTER.

The destructor removes the widget.



Sets the increment for the large step buttons.

The default value is 1.0.


    $count_a->step(.25, 1);

Sets the increments for both the normal and large step buttons.


Sets the increment for the normal step buttons.


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 <>