TcxEditingControl.OnPopulateCustomScrollbarAnnotationRowIndexList Event
Enables you to display custom scrollbar annotations.
#Declaration
property OnPopulateCustomScrollbarAnnotationRowIndexList: TdxPopulateCustomScrollbarAnnotationRowIndexList read; write;
#Remarks
This event occurs every time the container control starts to populate its scrollbar with marks of a custom scrollbar annotation. Call the ScrollbarAnnotations.CustomAnnotations.Add function to create a custom scrollbar annotation and handle the OnPopulateCustomScrollbarAnnotationRowIndexList event to mark certain records on a scrollbar. An event handler must check annotation mark display conditions. For instance, the following code example marks all records that list cars with two doors:
procedure TMyForm.cxDBVerticalGrid1PopulateCustomScrollbarAnnotationRowIndexList(Sender: TObject; AAnnotationIndex: Integer; ARowIndexList: TdxScrollbarAnnotationRowIndexList);
var
I: Integer;
AValue: Variant;
begin
for I := 0 to cxDBVerticalGrid1.RecordCount - 1 do // Iterates through all records
begin
AValue := clDoorCount.Properties.Values[I]; // Obtains the clDoorCount field value for the record
if(not VarIsNull(AValue) and (AValue = 2)) then // If the clDoorCount field value is 2
ARowIndexList.Add(I); // Adds the current record index to the list of marked records
end;
end;
Refer to the TdxPopulateCustomScrollbarAnnotationRowIndexList type description for detailed information on parameters accessible within an OnPopupCustomScrollbarAnnotationRowIndexList event handler.
Note
The On