Feature #712
closedWPopupMenuItem: Setting a destination WResource
0%
Description
Like WPushButton, WPopupMenuItem should have the possibility to behave like a WAnchor.
Updated by Momo LALMI over 13 years ago
Hi,
WPushButton is a little bit different from WAnchor,
the method setTarget() is available for WAnchor but not available for WPushButton,
To transform a WPushBotton to WAnchor I used to put the WPushButton object inside a WAnchor object.
May be you can do so for WPopupMenuItem...
Updated by Max Quatember over 13 years ago
Hi Mohamed!
Ok, but how to put a WAnchor in a WPopupMenu?
Regards,
Max
Updated by Momo LALMI over 13 years ago
Hi,
may be the following will work :
WAnchor * a = new WAnchor(...)
WPopupMenu * p = new WPopupMenu(...)
a->addWidget( p ) ;
a->setRef(...) ;
Updated by Max Quatember over 13 years ago
Hi Mohamed!
I want to achieve following:
- Create a WPopupMenu
- Add a WPopupMenuItem which launches "ResourceA : public WResource" if triggered
- Add a WPopupMenuItem which launches "ResourceB : public WResource" if triggered
- Add a WPopupMenuItem which launches "ResourceC : public WResource" if triggered
- Add a WPopupMenuItem which launches "WDialog" if triggered
- and so on, and so on...
- "popup" the WPopupMenu
If I'm adding a WPopupMenu to a WAnchor like you suggested I get a "Wt internal error" on "popup" (...property 'style' is null...).
The Problem is to bind a WPopupMenuItem to a WResource...
Best regards,
Max
Updated by Koen Deforche about 13 years ago
- Status changed from New to Resolved
- Assignee set to Koen Deforche
- Target version set to 3.1.11
Hey Max,
This has been implemented now (WPopupMenuItem has a setLink() method).
Regards,
koen
Updated by Koen Deforche about 13 years ago
- Status changed from Resolved to Closed
Resolved in Wt 3.1.11