Sign in to follow this  
Followers 0
faustf

list view list file in prgress why ???

2 posts in this topic

hi guy i  have  a part of  script  in cicle

this is  a code

$Group2 = GUICtrlCreateGroup("Magazzino", 8, 341, 753, 305)
    ;$ListView2 = GUICtrlGetHandle(GUICtrlCreateListView("Fat Acq | Codice a Barre | Codice | Descrizione | Quantità | Prezzo a Me | % Ricarico | Data Carico | Cod. Distr |CoDB ",18, 364, 730, 270,  BitOR($LVS_REPORT, $LVS_SHOWSELALWAYS, $WS_EX_CLIENTEDGE)))
    $ListView2 = GUICtrlGetHandle(GUICtrlCreateListView("",18, 364, 730, 270,  BitOR($LVS_REPORT, $LVS_SHOWSELALWAYS,$LVS_SORTASCENDING, $WS_EX_CLIENTEDGE)))
    _GUICtrlListView_SetExtendedListViewStyle($ListView2, $exStyles) ; questa stringa fa la griglia stile excel

    _GUICtrlListView_AddColumn($ListView2, "Fat Acq", 100)
    _GUICtrlListView_AddColumn($ListView2, "Codice a Barre", 60)
    _GUICtrlListView_AddColumn($ListView2, "Codice", 80)
    _GUICtrlListView_AddColumn($ListView2, "Descrizione", 550)
    _GUICtrlListView_AddColumn($ListView2, "Quantità", 70)
    _GUICtrlListView_AddColumn($ListView2, "Prezzo a Me", 65)
    _GUICtrlListView_AddColumn($ListView2, "% Ricarico", 70)
    _GUICtrlListView_AddColumn($ListView2, "Data Carico", 80)
    _GUICtrlListView_AddColumn($ListView2, "Cod. Distr", 50)
    _GUICtrlListView_AddColumn($ListView2, "CoDB", 20)

    GUICtrlCreateGroup("", -99, -99, 1, 1)

Dim $TableName = "prodotti"
    ; azzeramento ID list server  per  verificare  anche dopo un inserimento
    $IDList = ""
    ; azzeramento ID list
    $SQLInstance = _MySQLConnect($UserName, $Password, $Database, $MySQLServerName)
    $SQLCode = "SELECT * FROM prodotti ORDER BY Prod_ID DESC LIMIT 1"
    $TableContents = _Query($SQLInstance, $SQLCode)
    With $TableContents
        While Not .EOF
            $IDList &= .Fields("Prod_ID").value
            .MoveNext
        WEnd
    EndWith
    _MySQLEnd($SQLInstance)
    
    
    
    Do ; inizio  estrazione di tutti i campi
        Dim $TableName = "prodotti"
        ;==================================================  inizio azzeramento  variabili, serve per non replicare le scritte nei campi se premi il tasto piu volte
        $PcodDList = ""
        $PCList = ""
        $PDList = ""
        $PQList = ""
        $PPList = ""
        $PRList = ""
        $PTimeList = ""
        $PFATVendita = ""
        $PFATacquisto = ""
        ;=================================================== fine  azzeramento  variabili
        $SQLInstance = _MySQLConnect($UserName, $Password, $Database, $MySQLServerName)
        $SQLCode = "SELECT * FROM prodotti WHERE Prod_ID = " & $IDList
        $TableContents = _Query($SQLInstance, $SQLCode)
        With $TableContents
            While Not .EOF
                $PcodDList &= .Fields("Prod_CodDistrib").value
                $PCList &= .Fields("Prod_Codice").value
                $PDList &= .Fields("Prod_Descrizione").value
                $PQList &= .Fields("Prod_Quantita").value
                $PPList &= .Fields("Prod_Prezzo").value
                $PRList &= .Fields("Prod_Ricarico").value
                $PTimeList &= .Fields("Prod_Tempo").value
                $PFATacquisto &= .Fields("Prod_AssFatturaAcq").value
                $PFATVendita &= .Fields("Prod_AssFatturaVend").value
                .MoveNext
                
                MsgBox(0,'',$IDList)    
                #cs
        _GUICtrlListView_AddItem($ListView2, $PFATacquisto)
        _GUICtrlListView_AddSubItem($ListView2, $K1, $PFATVendita, 1)
        _GUICtrlListView_AddSubItem($ListView2, $K1, $PCList, 2)
        _GUICtrlListView_AddSubItem($ListView2, $K1, $PDList, 3)
        _GUICtrlListView_AddSubItem($ListView2, $K1, $PQList, 4) ;spesa incasso
        _GUICtrlListView_AddSubItem($ListView2, $K1, $PPList, 5) ;spesa trasporto
        _GUICtrlListView_AddSubItem($ListView2, $K1, $PRList, 6) ;spesa imballo
        _GUICtrlListView_AddSubItem($ListView2, $K1, $PTimeList, 7) ;spesa varire
        _GUICtrlListView_AddSubItem($ListView2, $K1, $PcodDList, 8)
        _GUICtrlListView_AddSubItem($ListView2, $K1, $IDList, 9)
        #ce
        
        
        _GUICtrlListView_AddItem($ListView2, $PFATacquisto, 0)
    _GUICtrlListView_AddSubItem($ListView2, 0, $PFATVendita, 1, 1)
    _GUICtrlListView_AddSubItem($ListView2, 0, $PCList, 2, 2)
    _GUICtrlListView_AddSubItem($ListView2, 0, $PDList, 3, 3)
    _GUICtrlListView_AddSubItem($ListView2, 0, $PQList, 4, 4)
    _GUICtrlListView_AddSubItem($ListView2, 0, $PPList, 5, 5)
    _GUICtrlListView_AddSubItem($ListView2, 0, $PRList, 6, 6)
    _GUICtrlListView_AddSubItem($ListView2, 0, $PTimeList, 7, 7)
    _GUICtrlListView_AddSubItem($ListView2, 0, $PcodDList, 8, 8)
    _GUICtrlListView_AddSubItem($ListView2, 0, $IDList, 9, 9)
    
    
    
    
    
    ;_GUICtrlListView_AddItem($ListView2, "fuck", 1)
    ;_GUICtrlListView_AddSubItem($ListView2, 1, "Row 2: Col 2", 1, 2)
   ; _GUICtrlListView_AddItem($ListView2, "Row 3: Col 1", 2)

        
        
        $k1 = $k1 + 1
            WEnd
        EndWith
        $IDList = $IDList - 1
    Until $IDList = 1

i want  write  in  one  row  9  object ,  and  after  rewrite over  , and  after rewirete over   .......  again again

but  this program do  a list like index    why ???

Share this post


Link to post
Share on other sites



i answer me  if  other people  have  the same problem 

 the proble is in option of  creating listview     i must  use  this   BitOR($LVS_REPORT, $LVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE))

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0