B4J Question MsgBox incomplete

Discussion in 'B4J Questions' started by GuyBooth, Jan 12, 2019.

  1. GuyBooth

    GuyBooth Active Member Licensed User

    I am running the following code to assemble a string of 11 lines extracted as a result of lookups in a database:

    For i = 0 To lstSelectedRows.Size-1
    ...more code

    Wait for (Lookup_SourceTrack (uPiece.Source, uPiece.SourceTrack)) Complete (SourceTracksFound As Boolean)
    If SourceTracksFound Then
    If Not(sb.IsInitialized) Then sb.Initialize
    TAB).Append(uPiece.Source).Append(" Track ").Append(uPiece.SourceTrack).Append(CRLF)
    End If   
    End If
    If sb.IsInitialized Then
            Message = 
    "The following Serial Nos and Tracks are already in the MusicBase:" & CRLF
            Message = Message & sb.ToString & 
            Message = Message & 
    "What do you want to do?"
            fx.Msgbox2(MB_Add.frmPGAddition, Message, 
    "New Pieces""""OK""", fx.MSGBOX_WARNING)
    End If
    The result is shown in the MsgBox1 attachment. Notice that the last line - "What do you want to do?" - is missing, and there is an ellipsis (…) at the end of the last item in the message.
    If I add two CRLFs (not one - one doesn't fix the problem) with this code:
    Message = Message & "What do you want to do?"
            Message = Message & 
            Message = Message & 
            fx.Msgbox2(MB_Add.frmPGAddition, Message, 
    "New Pieces""""OK""", fx.MSGBOX_WARNING)
    The result is close to what I expect as shown in the MsgBox2 attachment.
    Can anyone help me figure out how to resolve this? I have seen a similar problem with a much shorter list than this one.

    Attached Files:

  2. MarkusR

    MarkusR Well-Known Member Licensed User

    maybe write it shorter No. Track 1,2,3,4 or Track 1-4,6-12 ro Track All
    or make a custom dialog with a scrollable list inside.
  3. GuyBooth

    GuyBooth Active Member Licensed User

    This doesn't solve the problem. To me it looks like a bug in the fx.msgbox.
    Update: Same thing happens with xui.Msgbox2Async
    Last edited: Jan 12, 2019
  4. Erel

    Erel Administrator Staff Member Licensed User

    This is the behavior of the native dialog. Switch to B4XDialog from XUI Views to create a nicer and more powerful dialog.
    amaxco likes this.
  5. GuyBooth

    GuyBooth Active Member Licensed User

    Ok. The "standard" dialog shows the same ellipisis when I reach a certain number of lines, but at least it's consistent which helps me a lot.
    When I use the LongTextTemplate I run into other problems - I'll open a new thread since it is more concerned with xui views.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice