IUP
view release on metacpan or search on metacpan
lib/IUP/Text.pod view on Meta::CPAN
Background color of the text.
Default: the global attribute TXTBGCOLOR.
=item B<BORDER>
I<(creation only)>
Shows a border around the text. Default:
"YES".
=item B<CANFOCUS>
I<(creation only) (non inheritable)>
enables the focus
traversal of the control. In Windows the control will still get the
focus when clicked. Default: YES.
=item B<CARET>
I<(non inheritable)>
Position of the insertion point. Its format
depends in MULTILINE=YES. The first position, B<lin> or B<col>, is "1".
For multiple lines a string with the B<< "<lin>,<col>" >> format, where
B<lin> and B<col> are integer numbers corresponding to the caret's
position.
For single line a string in the B<< "<col>" >> format, where B<col>
is an integer number corresponding to the caret's position.
When B<lin> is greater than the number of lines, the caret is placed at
the last line. When B<col> is greater than the number of characters in
the given line, the caret is placed after the last character of the
line.
If the caret is not visible the text is scrolled to make it visible.
In Windows, if the element does not have the focus the returned value
is the position of the first character of the current selection. The
caret is only displayed if the element has the keyboard focus, but its
position can be changed even if not visible. When changed it will also
change the selection but the text will be scrolled only when it
receives the focus.
=item B<CARETPOS>
I<(non inheritable)>
Also the position of the insertion
point, but using a zero based character unique index "pos". Useful for
indexing the VALUE string.
=item B<CLIPBOARD>
I<(write-only)>
clear, cut, copy or paste the selection to
or from the clipboard. Values: "CLEAR", "CUT", "COPY" or "PASTE". In
Windows UNDO is also available, and REDO is available when
FORMATTING=YES.
=item B<COUNT>
I<(read-only)>
Returns the number of characters in the text. (since iup-3.5)
=item B<CUEBANNER>
I<[Windows Only] (non inheritable)>
Text that is displayed
when there is no text at the control. It works as a textual cue, or tip
to prompt the user for input. Valid only for MULTILINE=NO, and it is
not available for Windows 2000.
=item B<DRAGDROP>
I<[Windows and GTK Only] (non inheritable)>
Enable or disable
the drag&drop of files. Default: NO, but if DROPFILES_CB is defined
when the element is mapped then it will be automatically enabled.
=item L<FGCOLOR|IUP::Manual::03_Attributes/FGCOLOR>
Text color. Default: the global
attribute TXTFGCOLOR.
=item B<FILTER>
I<[Windows Only] (non inheritable)>
Allows a custom filter to
process the characters: Can be LOWERCASE, UPPERCASE or NUMBER (only numbers allowed).
=item L<FORMATTING|IUP::Manual::03_Attributes/FORMATTING>
I<[Windows and GTK Only] (non inheritable)>
When enabled allow the use of text formatting attributes.
In GTK is always enabled, but only when MULTILINE=YES. Default: NO.
=item B<INSERT>
I<(write-only)>
Inserts a text in the caret's position, also
replaces the current selection if any. Ignored if set before map.
=item B<LINECOUNT>
I<(read-only)>
Returns the number of characters in the line
where the caret is. When MULTILINE=NO returns always "1". (since iup-3.5)
=item B<LINEVALUE>
lib/IUP/Text.pod view on Meta::CPAN
I<(non inheritable) (write-only)>
sets VALUE but first
checks if it is validated by MASK. If not does nothing. (since iup-3.4)
=item B<VISIBLECOLUMNS>
Defines the number of visible columns for the
B<Natural Size>, this means that will act also as minimum number of
visible columns. It uses a wider character size then the one used for
the SIZE attribute so strings will fit better without the need of extra
columns. As for SIZE you can set to C<undef> after map to use it as an
initial value. Default 5
=item B<VISIBLELINES>
When MULTILINE=YES defines the number of visible lines
for the B<Natural Size>, this means that will act also as minimum
number of visible lines. As for SIZE you can set to C<undef> after map to
use it as an initial value. Default: 1
=item B<WORDWRAP>
I<(creation only)>
Valid only when MULTILINE=YES. If enabled
will force a word wrap of lines that are greater than the with of the
control, and the horizontal scrollbar will be removed. Default: NO.
=back
The following L<common attributes|IUP::Manual::03_Attributes/Common Attributes> are also accepted:
=over
=item * L<ACTIVE|IUP::Manual::03_Attributes/ACTIVE>, L<FONT|IUP::Manual::03_Attributes/FONT>,
L<EXPAND|IUP::Manual::03_Attributes/EXPAND>,
L<SCREENPOSITION|IUP::Manual::03_Attributes/SCREENPOSITION>,
L<POSITION|IUP::Manual::03_Attributes/POSITION>,
L<MINSIZE|IUP::Manual::03_Attributes/MINSIZE>,
L<MAXSIZE|IUP::Manual::03_Attributes/MAXSIZE>, L<WID|IUP::Manual::03_Attributes/WID>,
L<TIP|IUP::Manual::03_Attributes/TIP>,
L<RASTERSIZE|IUP::Manual::03_Attributes/RASTERSIZE>,
L<ZORDER|IUP::Manual::03_Attributes/ZORDER>,
L<VISIBLE|IUP::Manual::03_Attributes/VISIBLE>
=back
=head2 CALLBACKS
For more info about concept of callbacks (setting callback handlers etc.)
see L<IUP::Manual::04_Callbacks|IUP::Manual::04_Callbacks>. Callbacks specific to this element:
=over
=item L<ACTION|IUP::Manual::04_Callbacks/ACTION>
Action generated when the text is
edited, but before its value is actually changed. Can be generated when
using the keyboard, undo system or from the clipboard.
B<Callback handler prototype:>
sub action_handler {
my ($self, $c, $new_value) = @_;
#...
}
=over
B<$self:> reference to the element (IUP::Text) that activated the event
B<$c:> valid alpha numeric character or 0.
B<$new_value:> Represents the new text value.
B<Returns:> IUP_CLOSE will be processed, but the change will be ignored.
If IUP_IGNORE, the system will ignore the new value. If B<c> is valid
and returns a valid alpha numeric character, this new character will be
used instead. The VALUE attribute can be changed only if IUP_IGNORE is
returned.
=back
=item L<BUTTON_CB|IUP::Manual::04_Callbacks/BUTTON_CB>
Action generated when any
mouse button is pressed or released. Use L<ConvertXYToPos|IUP::Manual::02_Elements/"ConvertXYToPos()"> to convert (x,y)
coordinates in character positioning.
=item B<CARET_CB>
Action generated when the caret/cursor position is changed.
B<Callback handler prototype:>
sub caret_cb_handler {
my ($self, $lin, $col, $pos) = @_;
#...
}
=over
B<$self:> reference to the element (IUP::Text) that activated the event
B<$lin, $col:> line and column number (start at 1).
B<$pos:> 0 based character position.
For single line controls B<lin> is always 1, and B<pos> is always B<col-1>.
=back
=item L<DROPFILES_CB|IUP::Manual::04_Callbacks/DROPFILES_CB>
I<[Windows and GTK Only]>
Action generated when one or more files are dropped in the element.
=item L<MOTION_CB|IUP::Manual::04_Callbacks/MOTION_CB>
( run in 0.744 second using v1.01-cache-2.11-cpan-2398b32b56e )