Hi,
I added this method to DataGridView.as
public function scrollToIndex(index:int):Boolean
{
if (index == -1) return false;
var scrollArea:HTMLElement = listArea.element;
var oldScroll:Number = scrollArea.scrollTop;
var rowHeight:Number = _presentationModel.rowHeight;
var totalHeight:Number = sharedModel.dataProvider.length *
rowHeight - scrollArea.clientHeight;
scrollArea.scrollTop = Math.min(index * rowHeight, totalHeight);
return oldScroll != scrollArea.scrollTop;
}
When I try to compile (with ANT as always I do), I get this error:
[java]
/Volumes/Data/SDK/apache-royale-src/apache-royale/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DataGridView.as(191):
col: 19 Error: Type was not found or was not a compile-time constant:
HTMLElement.
[java]
[java] var scrollArea:HTMLElement = listArea.element;
[java]
The similar method works with ListView.as