Announcement

Collapse
No announcement yet.

ListView with editable sub items

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

  • ListView with editable sub items

    Good morning from Sydney.

    I just posted code in the source code forum and would appreciate
    any comments and enhancements to be posted here for everyone to
    benefit. I think my formatting has been lost in the posting and
    if that can be fixed it would be good.

    Regards to all
    David

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

  • #2
    Hi David,

    I played with it and found that I had to adjust the font size for the
    hListEdit control to fit correctly inside the cell. Although this was
    a quick fix for my machine it is probably better to find out what the
    systems current font/size is and use that instead.

    Code:
    Local hFont AS LONG
    hFont& = GetStockObject(%ANSI_FIXED_FONT)
    Call SendMessage( hListEdit, %WM_SETFONT, hFont&, 0 )
    Other than that, a great job!

    Regards,
    Jules
    Best regards
    Jules
    www.rpmarchildon.com

    Comment


    • #3
      Speaking of ListView, I just got done with making an ImageList
      which the ListView uses for icons. Anybody want me to post
      some sample code?



      ------------------
      -Greg
      -Greg
      [email protected]
      MCP,MCSA,MCSE,MCSD

      Comment


      • #4
        Hi Gregery;

        This is Anybody, I would be pleased to see that.

        Thanks!
        Regards,
        Jules
        Best regards
        Jules
        www.rpmarchildon.com

        Comment


        • #5
          Thanks for the comment Jules.

          Since my posting I had changed the hListedit font as:-

          CALL SendMessage(hListEdit, %WM_SETFONT, (SendMessage(hListView,%WM_GETFONT, 0, 0)) ,-1)

          It now has the same font as the parent ListView.

          Also, I needed to change to the following to ensure the list correctly
          scrolled to display columns that are not visible. Create the Listview
          with say 10 columns to see what I am about.

          In the FUNCTION LVEditSubItem, change to:-

          'Next get the Column offset
          Offset = 0
          FOR i = 0 TO (Column - 1)
          Offset = Offset + ListView_GetColumnWidth(hListView, i )
          NEXT



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

          Comment

          Working...
          X