Add new object to BoldListHandle as CurrentObject

Creating a new object from the BoldNavigator makes the new object the current object in the list and any attached BoldListHandles. This code replicates that functionality without a navigator component.

Any object can be made the current object by using the IndexOf method of a list object:

BoldListHandle1.CurrentIndex := BoldListHandle1.List.IndexOf( aBoldObject );

By using the list to create the new object, it is not necessary to know anything about the class contained by the list:

BoldListHandle1.CurrentIndex := BoldListHandle1.List.IndexOf( BoldListHandle1.MutableList.AddNew );


Share this article!

Follow us!

Find more helpful articles: