[SailfishDevel] cannot hide() contextmenu
Wim de Vries
wsvries at xs4all.nl
Wed Dec 18 14:45:32 UTC 2013
Thx. That works.
Maybe sth for in the documentation in the future?
On 12/18/2013 02:24 AM, Bea Lam wrote:
> Hello,
>
> On 17 Dec 2013, at 11:17 pm, Wim de Vries <wsvries at xs4all.nl> wrote:
>> Hi,
>> I am trying a contextmenu. I can show() it, but not hide it.
>> Clicking on the lower rectangle does not hide it:
> Just remove the “anchors.fill: parent” from your ContextMenu declaration. The ContextMenu type internally adjusts its ‘height’ property in order to make its contents appear and disappear when you call show() and hide(), so if you fix the menu’s dimensions using anchors.fill, it will not be able to internally control its height, as anchors take precedence over width/height values.
>
> In any case, you wouldn’t want to explicitly control the height of a ContextMenu because it automatically adjusts its height according to the number of items in the menu.
>
> cheers,
> Bea
> _______________________________________________
> SailfishOS.org Devel mailing list
>
More information about the Devel
mailing list