Class gtk.Entry
Defined in: jsgtk_merge_for_doc.js.
Constructor Attributes | Constructor Name and Description |
---|---|
gtk.Entry(maxLength)
A single line text entry field
|
Field Attributes | Field Name and Description |
---|---|
'blurred' signal
|
|
'changed' signal
|
|
'clicked' signal
|
|
'enterkeypressed' signal
|
|
'focused' signal
|
|
'keypressed' signal
|
Method Attributes | Method Name and Description |
---|---|
make gtk.Entry selectabe
|
|
make gtk.Entry unselectable
|
|
disable()
disable gtk.Entry
|
|
enable()
enable gtk.Entry
|
|
retrieves the value of the "max-length" property that specifies the maximum allowed length of the text in the entry.
|
|
getText()
Returns the value of the "text" property which is a string containing the contents of the entry.
|
|
Retrieves the current length of the text in entry
|
|
retrieves the value of the "visibility" property that determines whether the text in entry is visible.
|
|
gets the value of the "widthChars" property which is set by the setWidthChars() method
|
|
resizeEntryByFont(size)
Reset height by font size
|
|
select()
Method to select text in entry
|
|
setBorderVisible(isBorderVisible)
set the entry border to be visible or invisible
|
|
setDisplayLabel(label)
Set the displayed label in Entry.
|
|
setEnable(isEnabled)
Entry will be enabled or disabled
|
|
setFocus()
Focus the cursor in the entry
|
|
setMaxLength(max)
sets the "max-length" property to the value of max
|
|
setTabindex(index)
Method to set tab index value
|
|
setText(text)
Sets the "text" property to the value of text.
|
|
setTextSelectable(isSelectable)
|
|
setVisibility(visible)
sets the "visibility" property to the value of visible.
|
|
setWidthChars(nChars)
sets the "width-chars" property to the value of n_char
|
|
showError(isOnError)
Method to show error or not
|
Class Detail
gtk.Entry(maxLength)
A single line text entry field
- Parameters:
- {String} maxLength
- The maximum length of the entry
Field Detail
ENTRY_BLURRED
'blurred' signal
ENTRY_CHANGED
'changed' signal
ENTRY_CLICKED
'clicked' signal
ENTRY_ENTERKEYPRESSED
'enterkeypressed' signal
ENTRY_FOCUSED
'focused' signal
ENTRY_KEYPRESSED
'keypressed' signal
Method Detail
activateTextSelectable()
make gtk.Entry selectabe
deactivateTextSelectable()
make gtk.Entry unselectable
disable()
disable gtk.Entry
enable()
enable gtk.Entry
{integer}
getMaxLength()
retrieves the value of the "max-length" property that specifies the maximum allowed length of the text in the entry.
- Returns:
- {integer} The maximum allowed number of characters
{String}
getText()
Returns the value of the "text" property which is a string containing the contents of the entry.
- Returns:
- {String} text the content of the entry as a string
{interger}
getTextLength()
Retrieves the current length of the text in entry
- Returns:
- {interger} Return the current number of characters in GtkEntry, or 0 if there are none.
{boolean}
getVisibility()
retrieves the value of the "visibility" property that determines whether the text in entry is visible.
- Returns:
- {boolean} True if the text is currently visible
{integer}
getWidthChars()
gets the value of the "widthChars" property which is set by the setWidthChars() method
- Returns:
- {integer} number of chars to request space for
hideBorder()
resizeEntryByFont(size)
Reset height by font size
- Parameters:
- {Interger} size
- The size of font in pixel
select()
Method to select text in entry
setBorderVisible(isBorderVisible)
set the entry border to be visible or invisible
- Parameters:
- {Boolean} isBorderVisible
- If true, the entry border is visible. If false, the entry border is invisible
setDisplayLabel(label)
Set the displayed label in Entry. When the entry is focus, the label will be remove from entry
- Parameters:
- {String} label
- The label to be displayed in entry
setEnable(isEnabled)
Entry will be enabled or disabled
- Parameters:
- {boolean} isEnabled
setFocus()
Focus the cursor in the entry
setMaxLength(max)
sets the "max-length" property to the value of max
- Parameters:
- {interger} max
- The maximum length of the entry. The value passed in will be clamped to the range 0-65536.
setTabindex(index)
Method to set tab index value
- Parameters:
- {Integer} index
- integer value to be set
setText(text)
Sets the "text" property to the value of text. The string in text replaces the current contents of the entry.
- Parameters:
- {String} text
- A string to use as the new contents of the entry
setTextSelectable(isSelectable)
- Parameters:
- isSelectable
setVisibility(visible)
sets the "visibility" property to the value of visible. If visible is True the contents of the entry are displayed as plain text. If visible is False, the contents are obscured by replacing the characters with the invisible character
- Parameters:
- {boolean} visible
- If False the contents are obscured using the "invisible-char"
setWidthChars(nChars)
sets the "width-chars" property to the value of n_char
- Parameters:
- {interger} nChars
- Width in chars
showBorder()
showError(isOnError)
Method to show error or not
- Parameters:
- {Boolean} isOnError
- to show error, false to hide