Getting selection in TGListView

try:

	## Handler of the list events
	def handle_list_key(self, wframe, key, mask):
		entry = ROOT.BindObject(wframe, "TGLVEntry")
		if key == 4116: 
			self.eventlist_container.UnSelectAll()
			self.eventlist_container.SelectEntry(self.elements[1])
		self.eventlist_container.AdjustPosition()

Thanks! That is exactly what I need.

However, would you consider adding DeselectEntry() function, like you did with SelectEntry()? I donā€™t need it now, but it seems that it should be thereā€¦

Youā€™re welcome

Maybe, but I think youā€™re the first one asking for itā€¦ :thinking:

Iā€™m often the first one asking :wink: However, it is a one-liner (or 3-liner including formatting), basically copy of the SelectEntry() with ActivateItem replaced by DeactivateItem.

Yes, I know. Iā€™ll see what I can do

1 Like

Hi,

FYI, I solved the issue without having to introduce a new method, simply by fixing the behavior of TGLVContainer::SelectEntry(TGLVEntry *item). See this commit.

Cheers, Bertrand.

1 Like