NAME
FLTK::FloatInput - Subclass of FLTK::NumericInput
Description
A subclass of NumericInput that only allows the user to type floating point numbers (sign, digits, decimal point, more digits, 'E' or 'e', sign, digits), or hex constants that start with "0x". This is done by overriding the replace() method. Besides editing the text the user can use the up/down arrow keys to change the digits.
You may want a ValueInput widget instead. It has up/down buttons (what is called a "Spinner" in some toolkits).
If you change when()
to WHEN_ENTER_KEY
, the callback is only done when the user hits the up/down arrow keys or when the user types the Enter key. This may be more useful than the default setting of WHEN_CHANGED
which can make the callback happen when partially-edited numbers are in the field.
The type()
can either be either FLTK::FloatInput::FLOAT
or FLTK::FloatInput::INT
. Setting it to INT
makes this act like the IntInput subclass.
Functions
fvalue()
ivalue
lvalue()
new
Author
Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
License and Legal
Copyright (C) 2008-2010 by Sanko Robinson <sanko@cpan.org>
This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.
When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.