0

Problem with minWidth

asked 2014-03-12 08:50:49 +0800

salbader gravatar image salbader
15 5

updated 2014-03-12 09:09:25 +0800

Hello,

I have a listbox which is generate in this window

<window id="window" sizable="true" minwidth="1000" hflex="1" height="100%" width="100%"> </window>

when i change the width of my browser (firefox) then my listbox change the width too because of hflex="1". but at 1000 px i don't want that the listbox change the width. but minwidth does not work. and i don't get a horizontal scrollbar. please help.

delete flag offensive retag edit

Comments

I don't get your Problem. You want to resize the window & listbox until 1000px window width and <1000px it should be a scrollbar visible?

IngoB ( 2014-03-12 10:17:40 +0800 )edit

i need a limit for hflex="1" and i thought minwidth should be the solution. yes i want to resize the browser ... you got my problem!

salbader ( 2014-03-12 10:30:04 +0800 )edit

4 Answers

Sort by ยป oldest newest most voted
0

answered 2014-03-12 11:33:29 +0800

IngoB gravatar image IngoB flag of Germany
256 6

I think you have to dynamically react on resize.

http://books.zkoss.org/wiki/ZKDeveloper%27sReference/UIPatterns/BrowserInformationandControl

onClientInfo Event is triggered, if the there is a resize.

link publish delete flag offensive edit

Comments

I try it in my composer, both versions will not be triggered

public void onClientInfo(final ClientInfoEvent event) {}

public void onClientInfo$vlayoutId(final ClientInfoEvent event) {}

what is wrong?

salbader ( 2014-03-12 12:41:41 +0800 )edit
0

answered 2014-03-12 13:10:59 +0800

IngoB gravatar image IngoB flag of Germany
256 6

To retrieve the information about the client, you can register an event listener for the onClientInfo event to a root component.

link publish delete flag offensive edit

Comments

the event is still not triggered. any idea?

info.addEventListener(Events.ONCLIENTINFO, resizeEventListener);

resizeEventListener = new SerializableEventListener<Event>() { @Override public void onEvent(final Event event) throws Exception { xxx } };

salbader ( 2014-03-12 14:30:56 +0800 )edit

Notice that the onClientInfo event is sent from the client after the UI is rendered at the client so you will NOT trigger this event by resizing

chillworld ( 2014-03-12 14:58:59 +0800 )edit
0

answered 2014-03-12 14:49:20 +0800

IngoB gravatar image IngoB flag of Germany
256 6

is "info" the root element of your ZUL Page?

link publish delete flag offensive edit

Comments

thanks allot. the problem was the root component. i haven't the right one. now it works

salbader ( 2014-03-13 11:17:12 +0800 )edit
0

answered 2014-03-12 15:05:46 +0800

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

updated 2014-03-12 15:05:59 +0800

just take a look here :

http://books.zkoss.org/wiki/ZKDeveloper'sReference/UIPatterns/HflexandVflex#ComponentheightwithinHlayout.2FHboxusingminimum_vflex

summary : don't use minwith but with="1000px" and vflex="min"

Greetz chill.

link publish delete flag offensive edit

Comments

hi minwidth was not my solution look above. thanks for your post

salbader ( 2014-03-13 11:18:03 +0800 )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-03-12 08:50:49 +0800

Seen: 55 times

Last updated: Mar 12 '14

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