Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

Listview_Dblclick event?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Listview_Dblclick event?

    Does anybody succeeded in re-creating the VB Listview_Dblclick
    event in PB? Using ListView_HitTest should return the selected
    item, but how to know if it was double clicked? Did anybody
    published any source code for that?

    Thanks.

    Regards,


    Peter Redei


    ------------------

  • #2
    Somebody did discuss it, but forgot who ? Lasse R. maybe?
    If you want the whole project drop me an email.

    Regards, Jules
    mailto:[email protected][email protected]</A>

    Code:
    CALLBACK FUNCTION Dialog_Proc()
        LOCAL hDlg AS LONG
        LOCAL my_LpLvNm AS NM_LISTVIEW PTR
        LOCAL sText AS STRING
    
        hDlg = CBHNDL
        SELECT CASE CBMSG
            CASE %WM_NOTIFY
                SELECT CASE LOWRD(CBWPARAM)
                    CASE %IDLISTVIEW
                        my_LpLvNm = CBLPARAM
                        SELECT CASE @my_LpLvNm.hdr.code
                            CASE %LVN_ENDLABELEDIT
                                 MSGBOX "Done editing!"
                            CASE %LVN_COLUMNCLICK
                                IF (@my_LpLvNm.iSubItem <> -1) THEN
                                    'toggle ascending/descending
                                    lviewSort = NOT lviewSort
                                    ListView_SortItems  hListView, _
                                                        CODEPTR(Compare), _
                                                        @my_LpLvNm.iSubItem
                                    'lparam was set to the original 'recordnumber'
                                    'now this changed, we need to set it to the new position
                                    ResetLParam hListView
                                END IF
                            CASE %NM_DBLCLK             '<-- double click ***
                                sText = RetrieveLVData(hListView, @my_LpLvNm.iItem, @my_LpLvNm.iSubItem)
                                MSGBOX sText,48,"Just for Test Purposes"
                        END SELECT
                    END SELECT
                END SELECT
    END FUNCTION
    Best regards
    Jules
    www.rpmarchildon.com

    Comment


    • #3
      Thank you Jules. I appreciate it.

      Regards,


      Peter Redei

      ------------------

      Comment


      • #4
        Your very welcome Peter! It was your origional ListView include file
        and examples we are all learning from for this Control.

        Thank you!
        Regards, Jules
        Best regards
        Jules
        www.rpmarchildon.com

        Comment


        • #5
          Jules,
          I think I am getting to be too old. I just found it in my own code!
          Still, I think this is the most wonderful forum for programmers.
          You really do not need to reinvent the wheel here.

          Cheers,

          Peter

          ------------------

          Comment

          Working...
          X