B4J Question MsgBox incomplete

GuyBooth

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

B4X:
        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
                sb.Append(TAB).Append(uPiece.Source).Append(" Track ").Append(uPiece.SourceTrack).Append(CRLF)
            End If   
        Next
    End If
    If sb.IsInitialized Then
        Message = "The following Serial Nos and Tracks are already in the MusicBase:" & CRLF
        Message = Message & sb.ToString & CRLF
        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:
B4X:
        Message = Message & "What do you want to do?"
        Message = Message & CRLF
        Message = Message & CRLF
        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.
 

Attachments

  • MsgBox 1.PNG
    MsgBox 1.PNG
    31.5 KB · Views: 258
  • MsgBox 2.PNG
    MsgBox 2.PNG
    29.2 KB · Views: 257

MarkusR

Well-Known Member
Licensed User
Longtime 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.
 
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime User
maybe write it shorter No. Track 1,2,3,4 or Track 1-4,6-12 ro Track All
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:
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime 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.
 
Upvote 0
Top