Announcement

Collapse
No announcement yet.

Quick List View Question

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

  • Quick List View Question

    I use this code to select row in list views

    Code:
    TL1 = Row To Select
    '
    CONTROL HANDLE CBHNDL, %MailShots_01_Products_Packages_Rules_ListView TO TL2
    '
    ' Set Focus Row
    '
    Listview_SetItemState( TL2, TL1 - 1, %LVIS_SELECTED OR %LVIS_FOCUSED, %LVIS_SELECTED OR %LVIS_FOCUSED )
    '
    ' Ensure Row Is Visible
    Listview_EnsureVisible( TL2, TL1 - 1, %TRUE )
    How do I deselect a row? also deselect all rows?

  • #2
    See:

    regards,
    :) IRC :)

    Comment


    • #3
      Thanks Ian.

      I have another question, how can I check to see if a particular row is visible in the listview?

      Comment


      • #4
        e.g. LISTVIEW FIND hDlg, id&, row&, StrExpr TO datav&

        ' Move (datav&) row of interest into view

        CONTROL SEND hDlg, id&, %LVM_ENSUREVISIBLE, datav&, 0&

        ' Or just To find out if it's in view already

        CONTROL SEND hDlg, id&, %LVM_GETTOPINDEX, 0, 0 TO TopIndex&

        CONTROL SEND hDlg, id&, %LVM_GETCOUNTPERPAGE, 0, 0 TO CountPerPage&

        IF datav& > TopIndex& < (TopIndex& + CountPerPage& -1) THEN '.. item is visible
        Rgds, Dave

        Comment

        Working...
        X