0

How to deselect a listitem

asked 2010-12-30 10:18:10 +0800

orthello gravatar image orthello
18 2

I have a Listbox with multiple set to false. How do I deselect a selected listitem?
Shift right click and Cntrl right click is not deselecting the listitem.

James

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2010-12-30 11:13:46 +0800

twiegand gravatar image twiegand
1807 3

James,

Why not just catch the right-click event from the listbox component and deselect everything? Consider the following:

<zk>
	<listbox multiple="false">
		<attribute name="onRightClick">
			self.setSelectedItemApi(null)
		</attribute>
		<listitem label="AAAA"/>
		<listitem label="BBBB"/>
		<listitem label="CCCC"/>
	</listbox>
</zk>

Hopefully that helps.

Regards,

Todd

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-12-30 10:18:10 +0800

Seen: 375 times

Last updated: Dec 30 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More