[SailfishDevel] How to fully expand PullDownMenu programmatically or elsehow to use expandable menu items?

Artem Marchenko artem.marchenko at gmail.com
Sat Oct 19 09:55:53 UTC 2013

Thanks for the demo, Chris, looks interesting.

UI-wise I might want something similar, but inside a pulley menu the
challenges are different. Let me illustrate with the screenshots. There are
two concepts that need to work in concert: Combobox behavior with
small/large number of items and two ways of activating pulley menu item
(open-tap or pull-and-position).

1. ComboBox with small/large number of items
When there are just a few lines, combobox unwraps in place and it looks
[image: Inline image 2]

When there are many lines, it opens in a separate view:
[image: Inline image 3]

2. Menu activation
There are two ways to activate a menu item
2.1 Open menu fully and then tap
2.2 Pull carefully and release when the desired option is selected:
[image: Inline image 4]

**Desired situation**
Well, I want the combobox to be selectable via this 2.2 way - pull until
the lang choice combobox and it unwraps in whichever way it thinks is
appropriate (full screen or in place). The final result should look just as
if user opened menu in full and then tapped on the lang choice combobox

**The problem**
You can put anything inside the PullDownMenu, e.g. combobox itself, but the
only items that can be selected the pull-carefully way are MenuItems. I can
wrap a combobox with the MenuItem, but when selected.. it automatically
closes the menu. I want to prevent it and even more - I want menu to unwrap
full at the click moment, so that combobox could operate and resize fine.

I fail to achieve it so far, maybe somebody could help or state that
selecting non-trivial actions the pull-carefully way is against the
[coming?] Sailfish UI guidelines.

Best regards,

On Fri, Oct 18, 2013 at 6:34 PM, <christopher.lamb at thurweb.ch> wrote:

> Hi Artem
> Are you saying that when the pulley menu opens, the "Change Language" menu
> item would already be expanded with a list of languages?
> If so, my gut reaction is that that would be a little strange. I would
> expect the ComboBox to open when the user clicks "Change Language".
> However I fought with something similar some months ago. In my case I have
> a ListView, in this case with a list of countries. When one is
> PressedAndHeld, a ContextMenu opens below the MenuItem, and the ListView
> must resize (i.e. expand) accordingly. This proved quite tricky to do.
> I have just posted a small demo project I made at the time to Github at:
> https://github.com/**sailfishapps/ThrowawayDemos/**tree/master/Working/**
> LandedSettingsCMenuDemo2<https://github.com/sailfishapps/ThrowawayDemos/tree/master/Working/LandedSettingsCMenuDemo2>
> m.f.g
> Chris
> Zitat von "Artem Marchenko" <artem.marchenko at gmail.com>:
>  Hi All
>> *ComboBox inside the pulley menu*
>> I am trying to have a language selection in a pulley menu. ComboBox seems
>> to be ideal for this purpose, I add it into the PullDownMenu and
>> everything
>> works just great except that the user has to expand the menu fully for
>> clicking on ComboBox, this item is not activatable during the pull.
>> *Activation during the pull*
>> Well, I want it to activate during the pull, so I wrapped it into a
>> MenuItem and passed onClicked from MenuItem to inner ComboBox. That works
>> fine if combobox has so many items that it launches a full page on click.
>> So I tried preventing pulley from closing via cancelBounceBack() - doesn't
>> look good, not the same as if user activates item manually.
>> *How do I expand the pulley menu fully programmatically*
>> - So how do I simulate the situation when user fully expands the pulley
>> menu then?
>> - Or is the whole idea wrong and [coming] UI guidelines are going to tell
>> that only true single line MenuItems should be selectable during pull?
>> Best regards,
>> Artem.
>> --
>> Artem Marchenko
>> http://**agilesoftwaredevelopment.com<http://agilesoftwaredevelopment.com>
>> http://twitter.com/AgileArtem

Artem Marchenko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20131019/68581778/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SailfishOS_Emulator__Running_.png
Type: image/png
Size: 123319 bytes
Desc: not available
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20131019/68581778/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SailfishOS_Emulator__Running_.png
Type: image/png
Size: 69961 bytes
Desc: not available
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20131019/68581778/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pasted_Image_19.10.2013_12.46.png
Type: image/png
Size: 35351 bytes
Desc: not available
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20131019/68581778/attachment-0002.png>

More information about the Devel mailing list