BBjInputT::getCaretPosition

Description

In BBj 24.00 and higher, this method returns the caret position in the BBjInputT control.

Syntax

Return Value Method
int getCaretPosition()

Parameters

None.

Return Value

Returns the position of the caret in the BBjInputT control.

Example

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(50,50,200,200,"BBjInputT",$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
inputt! = window!.addInputT(101,25,25,150,25,$$)
inputt!.setValue(tim)
inputt! = window!.addInputT(102,25,75,150,25,$$)
inputt!.focus()
inputt!.setValue(tim)
caret! = window!.addToolButton(103,25,125,150,25,"setCaretPosition",$$)
caret!.setCallback(caret!.ON_TOOL_BUTTON_PUSH,"setCaretPosition")
process_events

eoj:
release

setCaretPosition:
    print "getCaretPosition",inputt!.getCaretPosition()
    inputt!.setCaretPosition(3)
    print "getCaretPosition",inputt!.getCaretPosition()
return

ClosedVersion History

  • BBj 24.00: BBjInputT::getCaretPosition added.

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.