<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi,</p>
<p>I created a SilicaGridView with a ContextMenu (placed in a
ColumnLayout):<br>
<tt><br>
SilicaGridView {<br>
id: myView<br>
<br>
Layout.preferredWidth: parent.width<br>
Layout.fillHeight: true<br>
<br>
model: myModel<br>
<br>
cellWidth: width / gridDimension // say, gridDimension = 2<br>
cellHeight: height / gridDimension<br>
<br>
delegate: BackgroundItem {<br>
<br>
id: bgItem<br>
width: myView.cellWidth<br>
height: myView.cellHeight<br>
<br>
ContextMenu {<br>
id: contextMenu<br>
parent: bgItem<br>
anchors {<br>
left: bgItem.left<br>
right: bgItem.right<br>
bottom: bgItem.bottom<br>
}<br>
<br>
MenuItem {<br>
text: "Remove"<br>
onClicked: myModel.remove(model.index)<br>
}<br>
}<br>
<br>
onPressAndHold: contextMenu.show(this)<br>
<br>
VisualElement {<br>
/* ... */<br>
}<br>
}<br>
}</tt></p>
<p>Then I tried using it. I pressed and held the BackgroundItem. The
menu appeared. I stopped pressing the mouse. The screen dimmed. I
decided not to remove. The screen undimmed. I entered the menu
again. The screen dimmed. I removed the element: the screen did <b>not</b>
undim. </p>
<p>What have I done wrong?<br>
</p>
<pre class="moz-signature" cols="72">--
Marcin</pre>
</body>
</html>