Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I need to handle the DblClick event without expanding the items. Is it possible?

0
Posted

I need to handle the DblClick event without expanding the items. Is it possible?

0

The control’s ExpandOnDblClick property whether the item is expanded or collapsed when the user dbl clicks an item. By default, the ExpandOnDblClick is True, so you need to set the ExpandOnDblClick property on False, and to use a handler like follows: Private Sub Grid1_DblClick(Shift As Integer, X As Single, Y As Single) With Grid1 Dim c As Long, h As HITEM, hit as Long h = .ItemFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY, c, hit) If Not (h = 0) Then With .Items Debug.Print .

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.