Re: [問題] ZK listbox 如何顯示 scroll bar

看板Ajax作者 (dk)時間11年前 (2012/12/10 21:21), 編輯推噓1(102)
留言3則, 3人參與, 最新討論串2/2 (看更多)
※ 引述《wxyy (裝笑幃)》之銘言: : 底下這段 : <window height="120px" border="normal"> : <hbox height="100%"> : <listbox height="120px"> <!-- 高度:120px 有 scroll bar --> : <listitem forEach="a, b, c, d, e, f, g" label="${each}"/> : </listbox> : <listbox height="100%"> <!-- 高度: 100% 沒有 scroll bar --> : <listitem forEach="1, 2, 3, 4, 5, 6, 7" label="${each}" /> : </listbox> : </hbox> : </window> : 顯示結果 : http://ppt.cc/uYr1 : 我想用高度 100% 的 listbox, 要如何才能正確的顯示 scroll bar ??? 因為 ZK 有真正去算 Component 的 Size 的屬性是 hflex/vflex, 用 % width/height 的話只是簡單的給在 root element 上面, 建議使用 hflex/vflex 取代百分比的 width/height, 參考資料 http://books.zkoss.org/wiki/ZK_Developer's_Reference/UI_Patterns/Hflex_and_Vflexhttp://ppt.cc/cX2j sample at zkfiddle http://zkfiddle.org/sample/2ovduhc/2-ZK-listbox-size-scroll -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.168.1.69

12/11 01:00, , 1F
可以的話還是建議直接給定高度啦 XD vflex 有他的麻煩。
12/11 01:00, 1F

12/11 07:41, , 2F
嗯嗯, 尤其是在 listbox, grid 或 tree 這些東西上
12/11 07:41, 2F

12/11 10:40, , 3F
謝謝, 搞定了...
12/11 10:40, 3F
文章代碼(AID): #1GnU7AOn (Ajax)
文章代碼(AID): #1GnU7AOn (Ajax)