Revision history [back]

click to hide/show revision 1
initial version

asked 2020-04-16 19:31:01 +0800

Jsimm876 gravatar image Jsimm876

Orient in Tabbox not working correctly

When you have a child tabbox, with orient="left" set, with a parent tabbox, with an orient="top" set the child tabbox moves the tabs to the left but the individual tabs are oriented as if they are still set to orient="top"

any ideas how to fix this?

heres some example code grabbed from ZKFiddle

index.zul

<zk>   <tabbox orient="top" hflex="1" vflex="1">
    <tabs>
      <tab label="Tab 1"/>
      <tab label="Tab 2"/>
    </tabs>
    <tabpanels>
      <tabpanel>
        <tabbox orient="left" hflex="1" vflex="1">
          <tabs>
            <tab label="Tab 1"/>
            <tab label="Tab 2"/>
          </tabs>
          <tabpanels>
            <tabpanel>Panel 1</tabpanel>
            <tabpanel>Panel 2</tabpanel>
          </tabpanels>
        </tabbox>
      </tabpanel>
      <tabpanel>Panel 2</tabpanel>
    </tabpanels>   </tabbox> </zk>

TestComposer.java

import org.zkoss.zk.ui.*;
import org.zkoss.zk.ui.event.*;
import org.zkoss.zk.ui.util.*;
import org.zkoss.zk.ui.ext.*;
import org.zkoss.zk.au.*;
import org.zkoss.zk.au.out.*;
import org.zkoss.zul.*;

public class TestComposer extends GenericForwardComposer{

    public void doAfterCompose(Component comp) throws Exception {
        super.doAfterCompose(comp);

    }

    public void onClick$btn(Event e) throws InterruptedException{
        Messagebox.show("Hi btn");
    }
}

Orient in Tabbox not working correctly

When you have a child tabbox, with orient="left" set, with a parent tabbox, with an orient="top" set the child tabbox moves the tabs to the left but the individual tabs are oriented as if they are still set to orient="top"

any ideas how to fix this?

heres some example code grabbed from ZKFiddle

index.zul

<zk> <zk>
  <tabbox orient="top" hflex="1" vflex="1">
    <tabs>
      <tab label="Tab 1"/>
      <tab label="Tab 2"/>
    </tabs>
    <tabpanels>
      <tabpanel>
        <tabbox orient="left" hflex="1" vflex="1">
          <tabs>
            <tab label="Tab 1"/>
            <tab label="Tab 2"/>
          </tabs>
          <tabpanels>
            <tabpanel>Panel 1</tabpanel>
            <tabpanel>Panel 2</tabpanel>
          </tabpanels>
        </tabbox>
      </tabpanel>
      <tabpanel>Panel 2</tabpanel>
    </tabpanels>   </tabbox> </tabpanels>
  </tabbox>
</zk>

TestComposer.java

import org.zkoss.zk.ui.*;
import org.zkoss.zk.ui.event.*;
import org.zkoss.zk.ui.util.*;
import org.zkoss.zk.ui.ext.*;
import org.zkoss.zk.au.*;
import org.zkoss.zk.au.out.*;
import org.zkoss.zul.*;

public class TestComposer extends GenericForwardComposer{

    public void doAfterCompose(Component comp) throws Exception {
        super.doAfterCompose(comp);

    }

    public void onClick$btn(Event e) throws InterruptedException{
        Messagebox.show("Hi btn");
    }
}
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More