Bug? ListView

Discussion in 'B4J Bugs & Wishlist' started by Pedro Caldeira, Jun 19, 2015.

  1. Pedro Caldeira

    Pedro Caldeira Member Licensed User

    When trying to get the value of a listview selectedindex i always get a null value.
    if i include the selecteditem, i get both values. and with just selectedItem work well.

    Code:
    Sub listRooms_SelectedIndexChanged(Index As Int)

          
    Dim xVarInx as string
          
    Dim iVarInx as string
      
          xVarInx=listRooms.SelectedItem
          iVarInx=listRooms.SelectedIndex
       
          GetRooms (iVarInx)  
          GetFullRooms (iVarInx, xVarInx)

    End Sub

    Sub GetRooms ( RoomNumber as string)
       
          
    msgbox.show (RoomNumber,""' Get nothing. Why ???

    End Sub

    Sub GetFullRooms ( RoomNumber as string, RoomName as string )
       
          
    msgbox.show (RoomNumber,RoomName) ' Get Number and Name.

    End Sub
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload a small example that demonstrates this issue?
     
  3. sonicmayne

    sonicmayne Member Licensed User

    I believe it's an issue with the jMsgboxes library. I've seen it here, it happens if text is too small (and sometimes just a number). I solved it by appending a space to the end of the displayed text.

    For example:
    Code:
    Sub GetRooms ( RoomNumber as string)
      
          
    msgbox.show (RoomNumber & " ","")

    End Sub
    Hope this helps
     
    Erel likes this.
  4. Pedro Caldeira

    Pedro Caldeira Member Licensed User

    Thanks sonicmayne.
    Going to try it
     
    sonicmayne likes this.
  5. Pedro Caldeira

    Pedro Caldeira Member Licensed User

    Hello all.
    It works.
    Indeed must be that small text issue. Just a minor glitch, easily solvable with that solution.
    Thank you all.
     
    sonicmayne likes this.
Loading...