0

Simple tabbox that changes as mouse over

asked 2014-08-07 10:32:23 +0800

PeteMorgan gravatar image PeteMorgan
3 2

Hi,

I'm using a simple tabpanel, the tabs are clickable and reveal the content for each tab. However is there a way to reveal the appropriate tab as the mouse goes over the data?

I can see there is an onMouseOver event that can be added to the tabs. However I don't know how on the backend (I'm using MVVM) I would hide or show a particular tabpanel.

The relationship between the tab and tabpanel is sort of automatically done by ZK so I wondered how I would go about making the tabs selected by mouse over.

Kind regards

Pete

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-08-07 10:54:44 +0800

chillworld gravatar image chillworld flag of Belgium
5367 4 9
https://github.com/chillw...

updated 2014-08-07 10:56:01 +0800

Zul:

<tabbox id="tabbox"> 
      <tabs> 
        <tab id="tab1" onMouseOver="@command('select', tab = tab1, tabbox = tabbox)">
            tab1
        </tab> 
        <tab id="tab2" onMouseOver="@command('select', tab = tab2, tabbox = tabbox)">
            tab2
        </tab>
      </tabs> 
</tabbox>

VM:

public void select(@BindingParam("tab") Tab tab, @BindingParam("tabbox") Tabbox tabbox) {
        tabbox.setSelectedTab(tab);
}

Created a fiddle you can test it..

Greetz chill.

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: 2014-08-07 10:32:23 +0800

Seen: 9 times

Last updated: Aug 07 '14

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