right click menu in what listbox? - got it!

Discussion in 'AutoCAD' started by Mark Propst, Aug 8, 2003.

  1. Mark Propst

    Mark Propst Guest

    unbelievable, I got it to work
    in the 'sub' form(not the top level)

    Private mCurrlist As String
    Friend Property Get CurrentList() As String
    CurrentList = mCurrlist
    End Property
    Friend Property Let CurrentList(ByVal val As String)
    mCurrlist = val

    End Property
    Private Sub lstCompNewer_Mousedown(Button As Integer, Shift As Integer, X As
    Single, Y As Single)
    mCurrlist = "lstCompNewer"
    If Button = vbRightButton Then
    PopupMenu frmCompFiles.mnuRtClk
    End If

    End Sub
    Private Sub lstSourceNewer_Mousedown(Button As Integer, Shift As Integer, X
    As Single, Y As Single)
    mCurrlist = "lstSourceNewer"
    If Button = vbRightButton Then
    PopupMenu frmCompFiles.mnuRtClk
    End If

    End Sub
    Private Sub lstCompOnly_Mousedown(Button As Integer, Shift As Integer, X As
    Single, Y As Single)
    mCurrlist = "lstCompOnly"
    If Button = vbRightButton Then
    PopupMenu frmCompFiles.mnuRtClk
    End If

    End Sub


    Private Sub lstSourceOnly_MouseDown(Button As Integer, Shift As Integer, X
    As Single, Y As Single)
    mCurrlist = "lstSourceonly"
    If Button = vbRightButton Then
    PopupMenu frmCompFiles.mnuRtClk
    End If

    End Sub


    'in the top level form where mnuRtClkSelAll is defined
    Private Sub mnurtclkselall_click()
    Dim idx As Integer
    'MsgBox frmCompFilesReport.ActiveControl.Name
    'MsgBox frmCompFilesReport.Controls
    'MsgBox mnuRtClkSelAll.Parent.Name

    For idx = 0 To
    frmCompFilesReport.Controls(frmCompFilesReport.mCurrlist).ListCount - 1

    'frmCompFilesReport.CurrentList.Selected(idx) = True
    frmCompFilesReport.Controls(frmCompFilesReport.mCurrlist).Selected(idx) =
    True
    Next

    End Sub
     
    Mark Propst, Aug 8, 2003
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.