How can I get a datagrid to behave like the ctrl key is active?

后端 未结 3 1698

I want my data grid to behave by default as if the user is holding the control key down. So when an item is clicked, then another item they are both part of the selection, c

3条回答
  •  暖寄归人
    2021-01-13 20:37

    You could also extend DataGrid and override the selectItem method like so:

    override protected function selectItem(item:IListItemRenderer, shiftKey:Boolean, ctrlKey:Boolean, transition:Boolean = true):Boolean
    {
        return super.selectItem(item, shiftKey, true, transition )
    }
    

    Less code and less likely to have impact on other elements that might be listening for that MouseEvent.

提交回复
热议问题