0

How to make focused list item of listbox visible

asked 2015-05-07 15:19:09 +0800

meerkat gravatar image meerkat
15 4

updated 2015-05-07 15:25:30 +0800

I know that I can use Ctrl+UP and Ctrl+DOWN to move the focus up and down by one list item without changing the selection

http://books.zkoss.org/wiki/ZK_Component_Reference/Data/Listbox#Mouseless_Entry_Listbox

But how to make focused list item visible? By default focused item does not have any mark thus mouseless multiple selection becomes harder.

I want to get something similar to windows explorer behavior, i.e. show frame around focused item.

delete flag offensive retag edit

4 Answers

Sort by ยป oldest newest most voted
1

answered 2015-05-10 11:38:50 +0800

Darksu gravatar image Darksu
1991 1 4

updated 2015-05-10 11:39:02 +0800

Hello meerkat,

You have to change the styling of the focused item. Please refer to the following url for more information:

http://books.zkoss.org/index.php?title=ZKStyleGuide/XULComponentSpecification/Listitem/Default

Best Regards,

Darksu

link publish delete flag offensive edit

Comments

Thanks for reply, Darksu. I've tried to change z-listitem-focus class and all works fine except that zk applies this class on the first td element in the row not entire row(I make fiddle http://zkfiddle.org/sample/139teqs/9-How-to-make-focused-list-item-of-listbox-visible). Is it bug?

meerkat ( 2015-05-12 10:56:39 +0800 )edit
0

answered 2015-05-17 13:57:39 +0800

Darksu gravatar image Darksu
1991 1 4

Hello meerkat,

Glad that it worked.

Regarding the issue indeed it is applied only to the first element, so you could put the items in a hbox and problem solved.

Best Regards,

Darksu

link publish delete flag offensive edit

Comments

Hello Darksu. Unfortunately, listitem tag supports only listcell as children. Or did you mean to put hbox inside single listcell?

meerkat ( 2015-05-18 08:00:05 +0800 )edit
0

answered 2015-05-31 08:51:18 +0800

Darksu gravatar image Darksu
1991 1 4

Hello meerkat,

I meant putting the hbox inside the listcell.

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2015-06-01 12:33:25 +0800

duder gravatar image duder
1
http://jakoszczedzic.blog...

thanks for help :)

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2015-05-07 15:19:09 +0800

Seen: 40 times

Last updated: Jun 01 '15

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