MapInfo Pro

 View Only
  • 1.  LISTBOX does not load all records

    Posted 20 days ago
    Edited by Peter Møller 18 days ago

    Hi

    I have this code, I want to show an array in a listbox, the problem is that there are 912 records, and not all of them appear in the listbox.

    Is there a display limit or why are they not displayed?

     ' CONDUCCIONES_LIST
            Control ListBox
                Title strCONDUCCIONES_LIST
                Position 1,20
                Width 255 Height 66
                Value 0
                ID ID_CONDUCCIONES_LIST
    
    ..................
    
    Sub CONDUCCIONES_READ
    OnError GoTo etiquetaError
    ReDim gblCONDUCCIONES_ARRAY(0)
            If UBound(gblCONDUCCIONES_ARRAY)=0 Then
            Dim intDA As SmallInt
            Dim contador As Integer
            Fetch First From CONDUCCIONES_LIST
            Do While Not EOT(CONDUCCIONES_LIST)
            contador = contador+1
                intDA=UBound(gblCONDUCCIONES_ARRAY)+1
                ReDim gblCONDUCCIONES_ARRAY(intDA)
                strCONDUCCIONES=CONDUCCIONES_LIST.FASE+" | "+CONDUCCIONES_LIST.CLAVE+" | "+CONDUCCIONES_LIST.PROV+" | "+CONDUCCIONES_LIST.MUN
                gblCONDUCCIONES_ARRAY(intDA)=strCONDUCCIONES+" "+Str$(CONDUCCIONES_LIST.ORDEN_COND)
                Fetch Next From CONDUCCIONES_LIST
            Loop
        End If
    Note contador
    
        strCONDUCCIONES_LIST=CONDUCCIONES_LIST()
        strCONDUCCIONES=""
    
    Exit Sub
    etiquetaError:
    Note "ERROR : " +  Chr$(13) & Chr$(10) + Error$()
    End Sub



    ------------------------------
    Mayca González Pérez
    COMUNIDAD. AUT. REG MURCIA
    ------------------------------



  • 2.  RE: LISTBOX does not load all records
    Best Answer

    Posted 20 days ago

    Hi Mayca,

    It is not clear in your sample code how exactly you are implementing this, but it looks like you are populating the ListBox using a string variable.  Perhaps it is this that has the limitation.  If you use the array gblCONDUCCIONES_ARRAY directly you might have more luck.  That is, the ListBox should specify the following:

    Control ListBox
                Title From Variable gblCONDUCCIONES_ARRAY()
               ...etc...

    Will that work?



    ------------------------------
    James Nolet
    GIS Manager
    Caf Consulting
    Mentone office, VIC, Australia
    ------------------------------



  • 3.  RE: LISTBOX does not load all records

    Posted 20 days ago
    I had similar code elsewhere and it worked.
    
    I have tried what you have advised me and it actually works. Thank you


    ------------------------------
    Mayca González Pérez
    COMUNIDAD. AUT. REG MURCIA
    ------------------------------



  • 4.  RE: LISTBOX does not load all records

    Posted 20 days ago

    No problem; I'm glad it worked and I was able to help!



    ------------------------------
    James Nolet
    GIS Manager
    Caf Consulting
    Mentone office, VIC, Australia
    ------------------------------