
BBjCEdit
Description
The BBjCEdit object provides methods for manipulating a GUI CEdit control.
Implemented Interfaces
DragSource, DropTarget, Editable, Focusable, MouseWheelEnabled, RecordSetBindable,Scrollable.SimpleRecordSetBindable,TabTraversable,TextControl,Validateable,
Creation
BBjAPI > BBjSysGui > BBjWindow > BBjCEdit
A BBjCEdit object is created through the following BBjWindow methods:
Return Value |
Method |
---|---|
BBjCEdit |
addCEdit(int ID, int x, int y, int width, int height, string title) |
BBjCEdit |
addCEdit(int ID, int x, int y, int width, int height, string title, string flags) |
BBjCEdit |
addCEdit(int ID, string title) |
BBjCEdit |
addCEdit(int ID, string title, String flags) |
BBjCEdit |
addCEdit(string title) |
BBjCEdit |
addCEdit(string title, String flags) |
Methods of BBjCEdit
Return Value |
Method |
---|---|
void |
addParagraph(int index, string paragraph) |
void |
addParagraphs(int index, BBjVector paragraphs!) |
void |
appendToParagraph(int parNum, string text) |
int | getCurrentParagraphIndex() |
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
int |
|
boolean |
|
int |
|
int |
|
int |
|
boolean |
|
string |
getParagraph(int parNum) |
int |
|
boolean |
|
boolean |
|
void |
highlight(int parIndex1, int off1, int parIndex2, int off2) |
boolean |
|
void |
|
void |
removeParagraph(int parIndex) |
void |
setDrawBorder(boolean draw) |
void |
setEditable(boolean editable) |
void |
setHorizontalScrollable(boolean scroll) |
void |
setIgnoreEnters(boolean ignore) |
void |
setIgnoreTabs(boolean ignore) |
void |
setLimitToOneParagraph(boolean limit) |
void |
setLineCountLimit(int limit) |
void |
setLineWrap(boolean wrap) |
void |
setMaxParagraphSize(int size) |
void |
setMaxLength(int length) |
void |
setOvertypeMode(boolean overtype) |
void |
setTabSize(int size) |
void |
setVerticalScrollable(boolean scroll) |
void |
setWrapStyleWord(boolean word) |
Methods of BBjCEdit implemented for DragSource
Return Value |
Method |
---|---|
int |
|
string |
|
void |
setDragActions(int actions) |
void |
setDragType(string type) |
Methods of BBjCEdit implemented for DropTarget
Return Value |
Method |
---|---|
int |
|
void |
setDropActions(int actions) |
void |
setDropTypes(BBjVector types) |
Methods of BBjCEdit implemented for Editable
Return Value |
Method |
---|---|
boolean |
|
void |
setEditable(boolean edit) |
Methods of BBjCEdit implemented for Focusable
Return Value |
Method |
---|---|
boolean |
|
void |
setFocusable(boolean focus) |
Methods of BBjCEdit implemented for RecordSetBindable
Return Value |
Method |
---|---|
void |
bindRecordSet(BBjRecordSet recordset, string fieldname) |
string |
Methods of BBjCEdit implemented for Scrollable
Return Value |
Method |
---|---|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
boolean |
|
boolean |
|
void |
setHorizontalScrollBarPosition(int position) |
void |
setVerticalScrollBarPosition(int position) |
Methods of BBjCEdit implemented SimpleRecordSetBindable
Return Value |
Method |
---|---|
void |
Methods of BBjCEdit implemented for TabTraversable
Return Value |
Method |
---|---|
boolean |
|
void |
setTabTraversable(boolean trav) |
Methods of BBjCEdit implemented for TextControl
Return Value |
Method |
---|---|
void |
addWord(string word) |
int |
|
string |
|
boolean |
|
int |
|
int |
|
string |
|
int |
|
string |
|
int |
|
string |
|
boolean |
getSpellCheckOption(int option) |
getSuggestions(string word) |
|
int |
|
void |
ignoreWord(string word) |
boolean |
isMisspelled(string word) |
boolean |
|
void |
removeWord(string word) |
void |
setBottomMargin(int margin) |
void |
setCustomDictionary(string filename) |
void |
setDisabledTextColor(BBjColor color!) |
void |
setDragEnabled(boolean enabled) |
void |
setHighlightOnFocus(int behavior) |
void |
setLeftMargin(int margin) |
void |
setLocale(string locale) |
void |
setMaxSuggestions(int count) |
void |
setPlaceholder(string placeholder) |
void |
setPlaceholderColor(BBjColor color!) |
void |
setRightMargin(int margin) |
void |
setSpellCheckColor(BBjColor color!) |
void |
setSpellChecked(boolean check) |
void |
setSpellCheckLanguage(string language) |
void |
setSpellCheckOption(int option, boolean value) |
void |
setTopMargin(int margin) |
Methods of BBjCEdit implemented for Validateable
Return Value |
Method |
---|---|
void |
accept(boolean valid) |
string |
Methods of BBjCEdit implemented for MouseWheelEnabled
Return Value |
Method |
---|---|
int |
|
void |
setScrollWheelBehavior(int trav) |
Methods of BBjCEdit inherited from BBjControl
Events
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
---|---|---|---|
ON_CONTROL_SCROLL |
p |
||
ON_CONTROL_VALIDATION |
v |
||
ON_DROP_TARGET_DROP |
D |
||
ON_EDIT_MODIFY |
e |
||
ON_GAINED_FOCUS |
f |
||
ON_LOST_FOCUS |
f |
||
ON_MOUSE_ENTER |
E |
||
ON_MOUSE_EXIT |
E |
||
ON_POPUP_REQUEST |
r |
||
ON_RIGHT_MOUSE_DOWN |
R |
CSS
The visual appearance of BUI controls is defined using CSS (cascading style sheets) rules. Easily change the default colors, border, and other settings by customizing these rules, all without changing any application code. See CSS API for a high-level overview of BUI CSS.
The BBjCEdit is implemented as a <textarea> element. It defines the following styles:
.BBjCEdit
.BBjCEdit.bbj-bordered
.BBjCEdit.bbj-disabled
.BBjCEdit.bbj-focused
.BBjCEdit.bbj-readonly
To modify the optional border:
.BBjCEdit.bbj-bordered { border: 1px solid #7f9db9; } |
By default, the BUI BBjCEdit is not user-resizable because resizing it can conflict with other controls on the page. That option can be added like this:
.BBjCEdit { resize: both; } |
Remarks
In BBj 10 and higher, the BBjCEdit honors the documented $0004$ flag ("Draws a border around the control"). This flag was previously ignored in BBj, so some applications didn't set it, even if they wanted borders. Set the CEDIT_BORDER !COMPAT setting to TRUE to show borders around all CEDIT controls, regardless of the state of the $0004$ flag.
Constants inherited from BBjControl
Example
REM Add a custom edit box to a window |
See Also
CEDIT Mnemonic - Create Multi-Line Text Edit Control
CALLBACK Verb - Register BBj Subroutine
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.