popupmenu

Hello,

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/

Thank you,
David

Doesn’t pushing a sample from the plugin help you?

That Adobe sample is great but that’s not possible.

That’s just it, I can’t seem to even get the sample code to work.

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)?

http://www.adobe.com/

Hi David,

About your mouseover-shows-popup-menu question.

The short answer is: No.

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.

Hope this helps.

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

But, I should be able to implement it in the menubar plugin right?!

yes, because you wrote the plugin in Java. the plugin undergoes the same transformation process from java code to javascript code.

:) already made a start…

The new version of the menubar plug-in, to be released beginning next week, will have a mouse-over popup.

The popup can be added to one or more elements at the same time.
One can add an offset for the x and y axis to the bottom left corner of the element.

That’s great news Marcel!

Thank you,
David

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.

Thanks for the addition bob. BTW all that info is available on the webpages:

  1. OS Supported
  2. Java Supported
  3. Servoy version Supported
  4. Servoy client Supported