Construct the widget.
Mixin common commands.
Get the bounding box of a character in the text.
Set the foreground color of the widget.
Set the background color of the widget.
Set the insert cursor color of the widget.
Set the text cursor just after the character index passed.
Delete the text.
Disable the selection export. This is only applicable to X based operating systems.
Set the font and style for the widget.
Set the font and style for the widget via a simple string. This method is exists to set the font using the output of the font dialog.
Get the length of the text.
Get the index where the insert cursor is.
Get the start and end indexes of the text selection if there is one.
Insert text at an index.
Append text to the end.
Insert text at the cursor position.
Set the alignment of the widget text.
Clear the text selection.
Check if any text selected.
Select the text.
Substitute all characters in the text for the passed character. This is useful for password entries.
Set the width of the widget if the geometry manager allows.
Get floating point values which represent the viewable portion of the text. Each element is a real fraction between 0 and 1; together they describe the horizontal span that is visible in the window. For example, if the first element is .2 and the second element is .6, 20% of the entry's text is off-screen to the left, the middle 40% is visible in the window, and 40% of the text is off-screen to the right.
Adjusts the view in the window so that the position appears at the left edge of the window. Position must be a fraction between 0.0 (start of the text) and 1.0 (end of the text).
Adjusts the view in the window so that the character index passed is displayed at the left edge of the window.
Scroll the text by a specified amount of characters. Positive values scroll text to the left, negative values scroll text to the right.
Scroll the text by a specified amount of pages. Positive values scroll text to the left, negative values scroll text to the right.
Set the widget's state.
Get the widget's state.
Test if a widget is in a particular state.
Remove the widget's state.
Reset the widget's state to default.
Set the widget's style.
Get the widget's style.
Set if the widget can recieve focus during keyboard traversal.
Get if the widget can recieve focus during keyboard traversal.
Geometry method for loosely placing this widget inside its parent using a web browser model. Widgets flow around each other in the available space.
Geometry method for placing this widget inside its parent using an imaginary grid. Somewhat more direct and intuitive than pack. Choose grid for tabular layouts, and when there's no good reason to choose something else.
Geometry method for placing this widget inside its parent using absolute positioning.
Geometry method for placing this widget inside its parent using relative positioning. In this case the position and size is specified as a floating-point number between 0.0 and 1.0 relative to the height of the parent. 0.5 means the widget will be half as high as the parent and 1.0 means the widget will have the same height as the parent, and so on.
auto entry = new Entry() .setValue("Text") .pack();
These are injected common commands that can also be used with this widget.
BoundingBox
Color
Cursor
Delete
Exportselection
Font
Index
Insert
Justify
Selection
Show
Value
Width
XScrollCommand
XView
Additional events that can also be bound to using the bind method.
<<Clear>>, <<Copy>>, <<Cut>>, <<Paste>>, <<PasteSelection>>, <<PrevWindow>>, <<TraverseIn>>, <Alt-Key>, <B1-Enter>, <B1-Leave>, <B1-Motion>, <B2-Motion>, <Button-1>, <Button-2>, <ButtonRelease-1>, <ButtonRelease-2>, <Control-Button-1>, <Control-Key-Left>, <Control-Key-Right>, <Control-Key-a>, <Control-Key-b>, <Control-Key-backslash>, <Control-Key-d>, <Control-Key-e>, <Control-Key-f>, <Control-Key-h>, <Control-Key-k>, <Control-Key-slash>, <Control-Key>, <Control-Shift-Key-Left>, <Control-Shift-Key-Right>, <Double-Button-1>, <Key-BackSpace>, <Key-Delete>, <Key-Down>, <Key-End>, <Key-Escape>, <Key-F10>, <Key-Home>, <Key-KP_Enter>, <Key-Left>, <Key-Return>, <Key-Right>, <Key-Tab>, <Key-Up>, <Key>, <Meta-Key>, <Shift-Button-1>, <Shift-Key-End>, <Shift-Key-Home>, <Shift-Key-Left>, <Shift-Key-Right>, <Triple-Button-1>,
States: In the disabled state, the entry cannot be edited and the text cannot be selected. In the readonly state, no insert cursor is displayed and the entry cannot be edited. The disabled state is the same as readonly, and in addition text cannot be selected. Typically, the text is "grayed-out" in the disabled state, and a different background is used in the readonly state.
An entry widget displays a one-line text string and allows that string to be edited by the user. Entry widgets support horizontal scrolling.