I know i must be doing something wrong, but I would really appreciate a simple example that demonstrats a single popupmenu. Also, can you control the look of the popupmenu (in other words can you change the font, size, color, etc, etc…)?
The effect I’m trying to achieve is similar to what Adobe has on their home page if you mouse over their menu bar (e.g., mouse over “Solutions” and you get a drop down menu). http://www.adobe.com/
Well, I don’t use it and I don’t have a sample at hand but either here at the forum or for sure at servoy magazine you should be able to find a good working sample.
Apologies for the lame answer but I don’t have any other right now…
Has anyone come up with a workaround for the same type of function as what Adobe has on their home page if you mouse over their menu bar (e.g., mouse over “Solutions” and you get a drop down menu)?
The long answer is that there is no mouseover event where you can hook up a method. So no way to show a popup menu just by mousing over (at this time).
I suggest you post a feature request for onMouseover events for form objects.
Hmm, a simple ‘on-mouse-over’ popup should be doable in the menubar plugin. I already implemented a ‘right-click’ popup… But stuff like fonts etc. is ‘a little harder’…
ROCLASI:
… there is no mouseover event where you can hook up a method.
Aren’t all form components just extensions of JComponent? At least in the rich client anyway… You could create a bean or plugin that attaches itself to a component via addMouseMotionListener.
Wow, there’s an interesting thought… I wonder if you could implement a MouseMotionListener dynamically in javascript, and just add it to a form field? That would be pretty damn cool. Can you create js classes in Servoy?
The components are extensions of JComponent so theoretically you can, but when the java classes are translated to JS Objects the implementation of them is different from the java implementation. Found this out the hard way when I was trying to manipulate a Graphics object from the JComponent. Currently there is no documentation for the JS implementation of java objects.
So until Servoy comes out with a mouse over event I don’t think its possible to do what you’re suggesting
It’s important to note that the menu plug-in only works in Smart Client, not in Web Client. As long as you’re deploying via the Smart Client - you’ll be all set.