BBjCEdit::getCurrentParagraphIndex

Description

In BBj 22.00 and higher, this method returns the current zero-based paragraph index in the BBjCEdit control.

Syntax

Return Value Method
int getCurrentParagraphIndex()

Parameters

None.

Return Value

Returns the zero-based paragraph index in the BBjCEdit control.

Remarks

This is equivalent to CTRL() Function 2 – Get Value.

Example

rem ' BBjCEdit::getCurrentParagraphIndex

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
title$ = "getCurrentParagraphIndex"
window! = sysgui!.addWindow(50,50,300,250,title$,$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
cedit! = window!.addCEdit(101,25,25,250,200,"",$0104$)
cedit!.setCallback(CEdit!.ON_EDIT_MODIFY,"index")
for i=0 to 10; cedit!.addParagraph(-1,"Paragraph "+str(i:"00")); next i
process_events

eoj:
release

index:
    index = dec(ctrl(gui,101,2))
    index = CEdit!.getCurrentParagraphIndex()
    x=msgbox("Modify Paragraph number: "+str(index),0+64+0,title$)
return

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

CTRL() Function 2 – Get Value

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