0

Listbox Grid Column Header is not align to the row in ZK 8

asked 2016-04-06 04:01:38 +0800

radenwibowo gravatar image radenwibowo
1 1

updated 2016-04-07 03:22:05 +0800

Hello Everyone,

I've a problem in our application. Previously we used ZK 6 and just upgraded to ZK 8 recently. But this upgrade give us problem, our listbox grid now is not align between column header and row. Previously work fine in ZK 6. And this problem only appear in IE and Firefox, it displays fine in the Chrome.

I tried to set the width in the ListHeader listheader.setWidth("30px") but still no effect, the problem still there.

Here the code that we use to set the listheader. We create our own ListheaderCustom by extend from ListHeader

Listheader listheader = new ListheaderCustom(columnDescriptor);
listheader.setVisible(columnDescriptor.getVisible());
listheader.setValue(fieldName);
listheader.setLabel(columnTranslation);
listheader.setWidth(String.format("%spx", columnDescriptor.getWidth()));

The problem is happening at Internet Explorer version 11.0.9600.18230

Any idea what we can do? Suggestion please

Hi,

Finally it works. I'm following this suggestion

ZK suggest's to specify hflex in column

So I set to my list header

listheader.setHflex("min");

And now it works for all browsers : chrome, ie and firefox Thanks a lot for your input.

cheers, raden

delete flag offensive retag edit

Comments

If possible, a code example or fiddle where you see the probleem can allow us to make the answers more concrete.

chillworld ( 2016-04-06 06:47:08 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-04-06 05:23:55 +0800

Darksu gravatar image Darksu
1991 1 4

Hello radenwibowo,

ZK suggest's to specify hflex in column, so could you please cross-check with your code?

Also if it still wont work please post a sample of your code and the browser version that you are using.

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2016-04-06 10:05:36 +0800

Darksu gravatar image Darksu
1991 1 4

Hello radenwibowo,

Please do a fast test:

Add the following code:

Listbox.setSizedByContent(boolean)

and remove the following:

listheader.setWidth(String.format("%spx", columnDescriptor.getWidth()));

Also another thing i observed is that you are using pixels instead of percentages. Also the same possibly can be applied to the listbox so please check out both.

For more info please refer to the following:

http://books.zkoss.org/wiki/ZKComponentReference/Data/Listbox

Best Regards,

Darksu

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
2 followers

RSS

Stats

Asked: 2016-04-06 04:01:38 +0800

Seen: 28 times

Last updated: Apr 07 '16

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