Event handler passing through to default behaviour

Discuss GUI programming with the RapaGUI plugin here
Post Reply
davec
Posts: 21
Joined: Thu Sep 03, 2020 10:39 pm

Event handler passing through to default behaviour

Post by davec »

I would like to be able to use the TitleClick notification in a listview, but would also like its default behaviour to still work (ie, on a sortable column still be able to toggle between ascending and descending sort and execute the sort).

However, if I listen to that notification and have some custom code for it in the event handler, it overrides the default behaviour and only my code is executed.

Is there a way to still listen to the notification and do something while continuing to use the default behaviour?

Thanks
Dave
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: Event handler passing through to default behaviour

Post by amyren »

I had a smilar experience (in the other sorting thread). It looks like TitleClick does not go well with setting columns sortable.
Hopefully this will work better with the awaited RapaGUI 2.0.
davec
Posts: 21
Joined: Thu Sep 03, 2020 10:39 pm

Re: Event handler passing through to default behaviour

Post by davec »

As did I (ie, that sorting thread), that's why I started this one :)

amyren wrote: Thu May 06, 2021 12:54 am I had a smilar experience (in the other sorting thread). It looks like TitleClick does not go well with setting columns sortable.
Hopefully this will work better with the awaited RapaGUI 2.0.
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: Event handler passing through to default behaviour

Post by amyren »

I did try to create a workaround by switching on/off the TitleClick notification.
But even just having this one line in the script will kill the sorting

Code: Select all

moai.Notify("lv", "TitleClick", False)
As an alternative I now use ClickColumn instead of TitleClick, and at least sort any column using that approach.
Post Reply