B4J Question Not call event in listview

omidaghakhani1368

Well-Known Member
Licensed User
Hi.
I add item to listview and i can handle selected index of listview
But when i have a one item in listview and if i select it,event of listview execute
but when again click on item,event of listview not execute
 

omidaghakhani1368

Well-Known Member
Licensed User
The event only fires when the selected index has changed.

You can add custom views to the list and then handle their events instead.
I know.It's working good when item count is above 1 item,
But in one item not work if once click on item
I think that if i add blank item to listview then it is ok,isn't?
 

Patent

Member
Licensed User
is there a similar solution for a treeview_SelectedItemChanged event?
First click fires.
Second not - for sure.
How can i "Clear" the Index for the Item?
 

Patent

Member
Licensed User
Thank you Erel,

that is the right direction for me.

A little trap hint for all who are interested:
Because of the listener is allready working, the "clearSelection" Method fires the "treeview1_SelectedItemChanged" Event with Selection= -1, which
could cause an Exeption if not intercepted.
 
Top