
These properties can be set or read from any single-line
Text item whose Implementation Class property is set to:
oracle.forms.fd.LAF_XP_TextField
Regular Expressions
properties
Cursor
position/selection properties
Regular
Expressions properties
Set the Regular Expression pattern.
property value: regex_pattern
Set_Custom_Property( '…', 1, 'SET_REGEX_PATTERN',
'^[a-z0-9._-]+@[a-z0-9._-]{2,}\.[a-z]{2,4}$' ) ;
The result of the expression's
evaluation can be obtained with the GET_REGEX_RESULT method, or in the
When-Custom-Item-Event Forms trigger if the ENABLE_EVENTS() method is used on
this text Item.
Set the error message when the pattern validation fails
Set_Custom_Property(
'…', 1, 'SET_REGEX_MESSAGE', 'incorrect pattern. must be [A-Z][a-z][a-z]' ) ;
Returns the result of the Regular Expression's evaluation
varchar2 := Get_Custom_Property( '…', 1, 'GET_REGEX_RESULT' ) ;
The returned value is 'true' if the pattern is found or 'false'
Returns the group in the string that matches the pattern
varchar2 := Get_Custom_Property( '…',
1, 'GET_REGEX_GROUP' ) ;
Returns start,end
position in the string that matches the pattern
Returned value is a coma delimited string : start_pos,end_pos
varchar2 := Get_Custom_Property( '…',
1, 'GET_REGEX_POSITION' ) ;
Set the blinking rate in milliseconds
property value : number_of_milliseconds.
Set_Custom_Property(
'…', 1, 'SET_BLINK_RATE', '400' ) ;
Set the foreground color of the text item.
property value : rgb_color
Set_Custom_Property(
'…', 1, 'SET_BLINK_FG_COLOR', 'r0g0b255' ) ;
Set the background color of the text item.
property value : rgb_color
Set_Custom_Property(
'…', 1, 'SET_BLINK_BG_COLOR', 'r0g0b255' ) ;
Start the blinking process.
Set_Custom_Property(
'…', 1, 'START_BLINK', '' ) ;
Stop the blinking process.
Set_Custom_Property(
'…', 1, 'STOP_BLINK', '' ) ;
Set the URL associated to the Text Item.
Set_Custom_Property(
'…', 1, 'SET_HYPER_LINK', 'http://otn.oracle.com' ) ;
Set the unclicked and visited link colors.
property_value : rgb_color[,rgb_visited_color]
Set_Custom_Property(
'…', 1, 'SET_HYPER_LINK_COLORS', 'r255g255b0' ) ;
Move the caret to the given position.
Set_Custom_Property(
'…', 1, 'SET_CURSOR_POSITION', '12' ) ;
Insert the given text at the current cursor position.
Set_Custom_Property(
'…', 1, 'INSERT_TEXT', 'Hello world' ) ;
Insert the given text at the given position.
property_value : position,text
Set_Custom_Property(
'…', 1, 'INSERT_TEXT_AT_POSITION', '12,Hello world' ) ;
Returns the current cursor position.
Varchar2 := Get_Custom_Property( '…', 1, 'GET_CURSOR_POSITION' ) ;
Pre-select the given characters in the text.
property_value : start_index,end_index
-- select
the substring from the 12th to the 18th characters --
Set_Custom_Property( '…', 1, 'SET_SELECTION_INDEX', '12,18' ) ;
Returns the current selected index.
the returning value is a coma delimited string : start_pos,end_pos
Varchar2 := Get_Custom_Property( '…', 1, 'GET_SELECTION_INDEX' ) ;
Returns the current selected value.
Varchar2 := Get_Custom_Property( '…', 1, 'GET_SELECTION_VALUE' ) ;
Set the maximum number of characters allowed.
Set_Custom_Property(
'…', 1, 'SET_MAX_CHAR', '30' ) ;
Enable/disable messages to be sent back to Forms.
property_value : Forms item name,true | false
Set_Custom_Property(
'…', 1, 'ENABLE_EVENTS', 'CTRL.TEXT4,true' ) ;
Events that
can be sent back to Forms are the following:
·
Regular Expression error message
·
cursor_position
·
last key pressed (int value, char value, keybaord
modifier)
·
hyperlink that has been clicked
These events
are captured in the When-Custom-Item-Event Forms trigger.
Enable/disable the log messages.
Set_Custom_Property( '…',
1, 'SET_LOG', 'true' ) ;