1

How to reduce the delay time while showing popup as tooltip?

asked 2010-06-11 07:57:48 +0800

baskaraninfo gravatar image baskaraninfo
526 2 2 9

We need to reduce the initial delay before showing the popup as a tooltip.

The following code has a simple label set as a tooltip for a button component:

<?page title="popup-onhover-demo" contentType="text/html;charset=UTF-8"?>
<zk>
	<window title="popup-onhover-demo" border="normal">
		<button label="Hover me" tooltip="popup" />
	</window>
	<popup id="popup" top="200px"
		left="350px">
		<label value="Hover message showing!!!" />
	</popup>
</zk>

I understood this delay is purposefully made for performance reasons. But, sometimes we need to compromise for fast responsiveness.

Any idea to customize the delay time to show popup tooltip is welcome.

Thank you.

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest
link publish delete flag offensive edit

answered 2010-06-14 00:28:21 +0800

baskaraninfo gravatar image baskaraninfo
526 2 2 9

updated 2010-06-14 02:28:55 +0800

Thank you, Maik :)

link publish delete flag offensive edit

answered 2010-06-22 11:26:51 +0800

twiegand gravatar image twiegand
1807 3

Hi, if you'd like to control the delay time at the individual component level, simply modify the tooltip in your zul to include the delay parameter:

<?page title="popup-onhover-demo" contentType="text/html;charset=UTF-8"?>
<zk>
	<window title="popup-onhover-demo" border="normal">
		<button label="Hover me" tooltip="popup, delay=0" />
	</window>
	<popup id="popup" top="200px"
		left="350px">
		<label value="Hover message showing!!!" />
	</popup>
</zk>

Just change the delay to whatever time (I think it is milliseconds) you like...

Hope that helps as well.

Todd

P.S. I'm running ZK5 so I'll apologize in advance if you are running 3.6.x and it isn't supported there...

link publish delete flag offensive edit

answered 2010-06-23 00:23:45 +0800

baskaraninfo gravatar image baskaraninfo
526 2 2 9

Thank you, Todd :)

This is great to customize only at the needed places.

link publish delete flag offensive edit

answered 2012-02-23 06:35:38 +0800

pradeep91 gravatar image pradeep91
6

Hi maik,

can you please send me a code for when mouse over in a image,grid will be display. in zk

pradeep

link publish delete flag offensive edit

answered 2012-02-23 18:50:08 +0800

twiegand gravatar image twiegand
1807 3

Pradeep,

Try something like this:

<zk>
	<window>
		<image src="http://www.zkoss.org/zksandbox/img/Centigrade-Widget-Icons/Globe-128x128.png" tooltip="popup, delay=0" />
	</window>
	<popup id="popup" top="200px" left="350px">
		<grid width="500px">
			<columns>
				<column label="Item" width="100px"/>
				<column label="Description"/>
			</columns>
			<rows>
				<row>
					<label value="11111"/>
					<label value="Lorem ipsum dolor sit amet, consectetur adipiscing elit."/>
				</row>
				<row>
					<label value="22222"/>
					<label value="Mauris sagittis quam sed nibh pulvinar tempus."/>
				</row>
			</rows>
		</grid>
	</popup>
</zk>

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-06-11 07:57:48 +0800

Seen: 2,038 times

Last updated: Feb 23 '12

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