Announcement

Collapse
No announcement yet.

Manage a ListView

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

  • Manage a ListView

    Hi
    I try to use in my applications in PB the control SYSLISTVIEW32 calling him with #INCLUDE "COMMCTRL.INC"
    I succeed in preparing and to easily fill the grid using one procedure of mine that calls ListView_InsertItem.
    But here is the problem:
    In VB using the object ListView I have available the events of the single click on a line and and to know in this way the value of one single cell

    Example:
    Private Sub lst_Quadri_ItemClick (ByVal Item As MSComctlLib.ListItem)
    l_SelectedQ = Item.Index
    lg_CodQuadro = Val (lst_Quadri.ListItems.Item (l_SelectedQ) .ListSubItems (1) .Text)

    of the double click and to open the window of the card with the values to modify

    Example:
    Private Sub lst_Quadri_DblClick()
    P_ModifyQ
    End Sub

    click on a column to force an arrangement
    et cetera et cetera

    Someone of good heart wish can explain me, even with a veeeeery clear and simple example, as I can manage this control to use all, or almost, the possibilities that VB offers?
    Thanks in advance
    Roberto from Italy
    robcondor

  • #2
    This thread will probably get moved (it should, as the Source Code Forum is not for questions), but it is your lucky day, since essentially the same question was asked and answered eariler today here:

    User to user discussions about the PB/Win (formerly PB/DLL) product line. Discussion topics include PowerBASIC Forms, PowerGEN and PowerTree for Windows.


    You will be looking for "NM_DBLCLK" instead of NM_CLICK or LVN_ITEMCHANGED.
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      I thank you.
      I have read the post but doesn't answer to my principal question (a single click), it is not very clear in the explanation of the source (variables not declared et cetera) and it doesn't develop the principal function that to bring the values of a row if the user moves him with the keyboard or click on a row.
      The management of a ListView is the base of any managerial program and not to be able to resolve it, sincerely is not a very nice thing.
      A programming language must resolve the problems and not to create them!
      Thanks in every case
      robcondor

      Comment


      • #4
        Read it today, I added a couple of posts to that thread.

        Of course, to stay in the Microsoft Visual Basic era you can just ignore my suggestions.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment

        Working...
        X