ComponentOne List 8.0 for ActiveX
UnboundGetRelativeBookmark Event (TDBCombo)

 

TDBCombo Reference> TDBCombo Events> UnboundGetRelativeBookmark Event (TDBCombo)

UnboundGetRelativeBookmark Event (TDBCombo)

This event is used in conjunction with the UnboundReadData or ClassicRead events when the control needs to obtain positional information about your underlying data.

Syntax

object_UnboundGetRelativeBookmark (StartLocation As Variant, ByVal Offset As Long, NewLocation As Variant, ApproximatePosition As Long)

Arguments

StartLocation is a bookmark that, together with Offset, specifies the row to be returned in NewLocation. A StartLocation of Null indicates a request for a row from BOF or EOF.

Offset specifies the relative position (from StartLocation) of the row to be returned in NewLocation. A positive number indicates a forward relative position; a negative number indicates a backward relative position.

NewLocation is a variable that receives the bookmark of the row specified by StartLocation plus Offset. If the row specified is beyond the first or the last row (that is, beyond BOF or EOF), then NewLocation should be set to Null.

ApproximatePosition is a variable that optionally receives the ordinal position of NewLocation. Setting this variable will enhance the ability of the control to display its vertical scroll bar accurately. If the exact ordinal position of NewLocation is not known, you can set it to a reasonable, approximate value, or just ignore this parameter.

Remarks

Event applies to TDBList and TDBCombo controls.

This event is mandatory when the DataMode property is set to 3 - Application. For DataMode 1 - Unbound, this event is optional. It is not used when the DataMode property is set to 2 - Unbound Extended.

By coding this event for DataMode setting 1 - Unbound, you can dramatically improve the performance of the control. However, you do not need to change existing applications; you can ignore this event and they will continue to function properly.

Before returning from this event, you must set NewLocation to a valid bookmark. For example, if Offset is 1 (or -1), then you must return in NewLocation the bookmark of the row that follows (or precedes) StartLocation. However, if the requested row is beyond the first or last row, then you should return Null in NewLocation to inform the control of BOF/EOF conditions.

See Also

TDBList and TDBCombo Controls

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback