=head1 NAME Win32::GUI::Textfield - Create and manipulate textfield controls =head1 DESCRIPTION [TBD] =for comment $Id: per_package_method_section.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head1 METHODS L apply to most windows, controls and resources. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 new B Creates a new Textfield object; can also be called as PARENT->AddTextfield(%OPTIONS). Class specific %OPTIONS are: -align => left/center/right (default left) aligns the text in the control accordingly. -keepselection => 0/1 (default 0) the selection is not hidden when the control loses focus. -multiline => 0/1 (default 0) the control can have more than one line (note that newline is "\r\n", not "\n"!). -password => 0/1 (default 0) masks the user input (like password prompts). -passwordchar => CHAR (default '*') The specified CHAR that is shown instead of the text with -password => 1 -lowercase => 0/1 (default 0) Convert all caracter into lowercase -uppercase => 0/1 (default 0) Convert all caracter into uppercase -autohscroll => 0/1 (default 1 (0 for a multiline Textfield)) Automatically scroll to right as text is typed past the right margin; If 0 for a multiline Textfield, then wrap to the next line. -autovscroll => 0/1 (default 1) For a multiline Textfiled automatically scroll down as lines pass the bottom of the control. -number => 0/1 (default 0) Allows only digits to be entered into the edit control -prompt => (see below) -readonly => 0/1 (default 0) text can't be changed. -wantreturn => 0/1 (default 0) when dialogui => 1 is in effect, stops the key behaving as a click on the default button, and allows the key to be entered in a multi-line Textfield The C<-prompt> option is very special; if a string is passed, a Win32::GUI::Label object (with text set to the string passed) is created to the left of the Textfield. Example: $Window->AddTextfield( -name => "Username", -left => 75, -top => 150, -width => 100, -height => 20, -prompt => "Your name:", ); Furthermore, the value to -prompt can be a reference to a list containing the string and an additional parameter, which sets the width for the Label (eg. [ STRING, WIDTH ] ). If WIDTH is negative, it is calculated relative to the Textfield left coordinate. Example: -left => 75, (Label left) (Textfield left) -prompt => [ "Your name:", 30 ], 75 105 (75+30) -left => 75, -prompt => [ "Your name:", -30 ], 45 (75-30) 75 Note that the Win32::GUI::Label object is named like the Textfield, with a "_Prompt" suffix (in the example above, the Label is named "Username_Prompt"). See also the L. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Append B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 CanPaste B Text data availlable in clibboard for a Paste. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 CanUndo B Determine whether an Textfield can be undone =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 CharFromPos B Returns a two elements array identifying the character nearest to the position specified by X and Y. The array contains the zero-based index of the character and its line index. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Clear B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Copy B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Cut B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 EmptyUndoBuffer B Reset the undo flag of an Textfield. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 FmtLines B Set the inclusion flag of soft line break characters on or off within a multiline TextField. A soft line break consists of two carriage returns and a linefeed and is inserted at the end of a line that is broken because of word wrapping. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 GetFirstVisibleLine B Return the uppermost visible line. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 GetLimitText B Return current text limit, in characters. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 GetLine B Get a line of text. LINE: zero based index to the line to be retrieved Returns the text of the line. Returns undef if LINE is greater than the number of lines in the Textfied. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 GetLineCount B Return the number of lines in a multiline Textfield. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 GetMargins B Return an array with right and left margins. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 GetModify B Determine whether the content of a Textfield has been modified. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 GetPasswordChar B Return the password character displayed . =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 GetRect B Return formatting rectangle is the limiting rectangle of the text. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 GetSel B Returns a 2 item list giving the index of the start and end of the current selection =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 GetThumb B Return the position of the scroll box (thumb) in a multiline Textfield. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 HaveSel B Check if a selection is availlable. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 LimitText B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 LineFromChar B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 LineIndex B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 LineLength B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 LineScroll B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 MaxLength B See L =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Modified B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Modify B See L =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 PasswordChar B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Paste B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 PosFromChar B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 ReadOnly B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 ReplaceSel B Replaces the current selection with the given STRING. The optional FLAG parameter can be set to zero to tell the control that the operation cannot be undone; see also L. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Scroll B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 ScrollCaret B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Select B See L =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 SelectAll B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Selection B See L =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 SetLimitText B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 SetMargins B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 SetModify B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 SetPasswordChar B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 SetReadOnly B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 SetRect B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 SetSel B Selects the specified range of characters. =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 SetTabStops B [TBD] =for comment $Id: per_package_method.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Undo B [TBD] =for comment $Id: per_package_event_section.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head1 EVENTS L apply to most windows and controls. =for comment $Id: per_package_event.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Change B Sent when the text in the field is changed by the user. =for comment $Id: per_package_event.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 GotFocus B Sent when the control is activated. =for comment $Id: per_package_event.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 LostFocus B Sent when the control is deactivated. =for comment $Id: per_package_event.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 MaxText B Sent when text has exceeded the specified number of characters =for comment $Id: per_package_event.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Scroll B Sent when one of the window scrollbars is moved. SCROLLBAR identifies which bar was moved, 0 for horizontal and 1 for vertical. =for comment $Id: per_package_event.tpl,v 1.3 2006/03/16 21:11:13 robertemay Exp $ =head2 Update B Sent when an edit control is about to display altered text. =for comment $Id: pod_postamble.tpl,v 1.2 2005/08/03 21:45:59 robertemay Exp $ =head1 VERSION Documentation for Win32::GUI v1.06 created 14 Feb 2008 This document is autogenerated by the build process. Edits made here will be lost. Edit F instead. =head1 SUPPORT Homepage: L. For further support join the users mailing list(C) from the website at L. There is a searchable list archive at L. =head1 COPYRIGHT and LICENCE Copyright (c) 1997..2008 Aldo Calpini. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.