0

Menupopup cover its parent

asked 2012-10-25 07:42:01 +0800

Neus gravatar image Neus
1415 14

Hi, I have a menu popup on the bottom left of my page. This menupopup has its own menupopup.
The problem is that when I open the menu and open one of its children the children appears over the parent and I can't select another item.
Here's a simple example:

<zk>
  <window border="normal" title="hello" height="100%" apply="pkg$.TestComposer">
    <borderlayout>
      <center>
      </center>
      <south>
        <menubar autodrop="true">
        <menu label="Opciones">
            <menupopup>
                <menu label="Empresa">
                    <menupopup>
                        <menuitem label="Emp 1" />
                        <menuitem label="Emp 2" />
                    </menupopup>
                </menu>
              <menu label="Idioma">
                <menupopup>
                  <menuitem label="ES"/>
                  <menuitem label="CA"/>
                </menupopup>
              </menu>
            </menupopup>
        </menu>
    </menubar>
      </south>
    </borderlayout>
  </window>
</zk>

Here you have an image:

It's been happening since yesterday when I update to the new freshly build. I'm using ZK 6.0.3.

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2012-11-06 11:02:42 +0800

Neus gravatar image Neus
1415 14

I'm using ZK 6.1 not ZK 6.5. And it worked fine until I updated to the 24-10 build.
I will try it but I will need to find a way to make all menus that are in the left corner work that way...

Thank you

link publish delete flag offensive edit

answered 2012-11-06 10:47:13 +0800

Bobzk gravatar image Bobzk
428 1 5

First of all, I tried the code above and it worked OK (not pretty, but worked) on ZK6.5. First drop down overlayes "Opciones", second drop down is at the right of the first.

However try the following :

<zk>
  <window border="normal" title="hello" height="100%" apply="pkg$.TestComposer">
    <borderlayout>
      <center>
      </center>
      <south>
        <menubar autodrop="false">
        <menu label="Opciones"  onClick='frog.open(100,100);'>
            <menupopup id="frog">
                <menu label="Empresa">
                    <menupopup>
                        <menuitem label="Emp 1" />
                        <menuitem label="Emp 2" />
                    </menupopup>
                </menu>
              <menu label="Idioma">
                <menupopup>
                  <menuitem label="ES"/>
                  <menuitem label="CA"/>
                </menupopup>
              </menu>
            </menupopup>
        </menu>
    </menubar>
      </south>
    </borderlayout>
  </window>
</zk>

You need to click on "Opciones" now to get the menu to open.

You can also use onClick='frog.open(self,"end_before");'

This just gives you an idea. You need to do other work as the click of the "drop-down" button needs trapping (the onClick is on the label, not the drop-down button).

Just hope it points you in the right area.

Bobzk.

link publish delete flag offensive edit

answered 2012-11-06 08:40:42 +0800

Neus gravatar image Neus
1415 14

I wans't able to solve it.
Any other idea?

link publish delete flag offensive edit

answered 2012-10-25 08:25:46 +0800

Bobzk gravatar image Bobzk
428 1 5

Have a look at adding the "position" information. OK, I've not used it with MenuPopup but have used it with Tootip like below :-

zz.setTooltip(popup_id + ", position=start_after, delay=500")

See also http://www.zkoss.org/zkdemo/popup/popup_position

I hope at least it points you in the right direction.

link publish delete flag offensive edit

answered 2012-10-25 07:42:18 +0800

Neus gravatar image Neus
1415 14

updated 2012-10-25 07:42:31 +0800

The image: http://imageshack.us/photo/my-images/803/menuzf.jpg/

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: 2012-10-25 07:42:01 +0800

Seen: 120 times

Last updated: Nov 06 '12

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