-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hi,
is there any way to add other items then menus or menuitems to a menubar?
in my case it would be nice to have a "search" field (text input field) directly attached in the menubar.
Thanks,
chris
I don't think that this is possible with the current version... I've never seen a textbox in a menu in any existing GUI-toolkit. Seems a little counter-intuitive from a usability perspective. If you need such a feature, please post to ZK Features:
http://sourceforge.net/tracker/?group_id=152762&atid=785194
Cheers, Maik
Hi,
where do you think that a search box should be located then?
my dialog is a borderlayout, with the menubar in north, a listbox showing the list where the search should apply in center and the pager in south...
Thanks
chris
Hi,
I've a new requirement: temporarly disabling menu items if they are not applicable for the current context...
like disabling a button. And maybe with two different images for enabled/disabled state ;)
bye,
chris
> where do you think that a search box should be located then?
It's no problem to place the SearchBox besides the Menubar (e.g. appending both to a Hbox), but why do you want to place the SearchBox into the Menubar?
<zk> <hbox> <menubar id="menubar"> <menu label="Project"> <menupopup> <menuitem label="New" /> </menupopup> </menu> </menubar> Search: <textbox /> </hbox> </zk>
Cheers, Maik
hi Maik,
it just seems to be more convenient if its inside of the menubar. if it's outside, i have to do lots of css styling to make it fit. especially for the actual 'search' button (mneuitem after the textbox)
have you seen the message about enabled/disabled state?
cheers,
chris
Here's an example how to disable a menuitem by code:
<zk> <menubar> <menu label="Project"> <menupopup> <menuitem label="Menuitem" /> <menuitem id="test" label="Test" /> </menupopup> </menu> </menubar> <button onClick="test.setDisabled(true);" label="Disable Test" /> </zk>
HTH, Maik
Asked: 2009-05-05 12:10:33 +0800
Seen: 593 times
Last updated: May 10 '09