Dirty hack to implement setSelection()