[SailfishDevel] ContextMenu inside a PullDownMenu

Lauri Lavanti laurilavanti at gmail.com
Wed Nov 27 04:32:07 UTC 2013


Okay.

The use case is, that I have a simple setting (the campus the user's on)
and I'd like to have him be able to change it on the fly from a simple
list, even though it doesn't need to be visible all the time

--
Lauri Lavanti
laurilavanti at gmail.com
------------------------------
Lähettäjä: Martin Jones
Lähetetty: 27.11.2013 3:28
Vastaanottaja: Sailfish OS Developers
Aihe: Re: [SailfishDevel] ContextMenu inside a PullDownMenu

  Hi,

 This will not work and I can’t imagine this case being made to work in the
future. The pulley menus are designed to be pulled down to highlight an
option and released to select. A ContextMenu/ComboBox inside a pulley menu
is incompatible with the interaction design of the pulley menu.

 Perhaps you could explain the use case you’re trying to accomplish and we
could suggest an alternative, or pass some feedback on to our designers.

 Best Regards,
Martin.

 On 26 Nov 2013, at 10:07 pm, Lauri Lavanti <laurilavanti at gmail.com> wrote:

  Hi,

 I’m hoping I’m not the only one who’s been trying something like this and
even more so I hope there’s a solution for it:

I’ve been trying to get a ContextMenu inside the PullDownMenu with code
like this:
PullDownMenu {
             MenuItem {
                 ComboBox {
                     width: *page*.width
                     label: "Kampus: "

                     menu: ContextMenu {
                         id: *menu*
                         Repeater {
                             model: ["Kaikki", "Otaniemi", "Töölö", "Arabia"
,
                                 "Kumpula", "Keskusta", "Kallio", "Viikki"]
                             MenuItem {
                                 text: modelData
                                 onClicked: { *kampus* = modelData }
                             }
                         }
                     }
             }
 }
 Buut, it doesn’t do anything when selected, another thing I did was try to
replace the MenuItem with the ComboBox straight, but of course that didn’t
do squat. I’ve also tried to insert the ContextMenu straight to the
MenuItem buuut that keeps telling me I can’t (surprise).

 So, any pointers/tips/solutions?

 --
 Lauri Lavanti
 laurilavanti at gmail.com



------------------------------
  <http://www.avast.com/>

Tässä sähköpostiviestissä ei ole viruksia eikä haittaohjelmia, koska avast!
Antivirus <http://www.avast.com/> suojaus on käytössä.

_______________________________________________
SailfishOS.org <http://sailfishos.org/> Devel mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20131126/2faae129/attachment.html>


More information about the Devel mailing list