https://foro.gambas-es.org/viewtopic.php?f=1&t=7061&p=42625#p42625
-----------------------------------
vuott
Lunes, 30 Julio 2018, 12:43

Re: Menú Contextual En Columnview
-----------------------------------
[quote user="jsbsan" post="42624"]Puedes usar la propiedad PopupMenu del control[/quote]

...cuanto me gusta esto !!!   :lol: 

[code linenumbers=false syntax=gambas]Public Sub Form_Open()
  
  With ColumnView1
    .AddColumn("primum", "50", Align.Center)
    .Add("1", "1 item", Null, Null, Null)
  End With
  With ColumnView1
    .AddColumn("secundum", "50", Align.Center)
    .Add("2", "2 item", Null, Null, Null)
  End With

End
' 
Public Sub ColumnView1_MouseUp()

  Dim MN, mn1, mn2 As Menu
  
  If Mouse.Right Then
    MN = New Menu(Me)
    
    With mn1 = New Menu(MN) As "Menu"
      .Caption = "Destruir este item"
    End With
    With mn2 = New Menu(MN) As "Menu"
      .Caption = "Declarate anti-Pythonista..."
    End With
    MN.Popup
  Endif
    
End


Public Sub Menu_Click()
  
  Select Case Last.Caption
    Case "Destruir este item"
      ColumnView1.Current.Delete
    Case "Declarate anti-Pythonista..."
      Balloon("<FONT Color=blue size=6><B>YO NO SOY PYTHONISTA !!!", ColumnView1, Null, Mouse.X, Mouse.Y)
  End Select
  
End[/code]


