B4J Question [B4X]CLV. DesignerLabel.TextSize behavior is different in B4A and B4J

MrKim

Well-Known Member
Licensed User
Longtime User
In B4A, using Addtextitem after setting the above property sets the text size to DesignerLabel.TextSize - works fine.
In B4J it does not. Interestingly, in B4J it clearly ALLOWS for the text size because the item gets BIGGER as the textsize gets bigger. It just doesn't change the text size.
I haven't tested with B4i yet.

B4X pages, xCustomListView 1.73, B4J 8.90

LogoutListCLV.DesignerLabel.TextSize = 20
1622359648005.png


LogoutListCLV.DesignerLabel.TextSize = 60
1622358186374.png


B4X:
        Else If res.Rows.Size > 1 Then
            #IF B4A
                LogoutListCLV.DesignerLabel.TextSize = 30
            #ELSE
                LogoutListCLV.DesignerLabel.TextSize = 60
            #End If
            For Each M As Map In LogoutJobs
                Lo = M.get("ID")
                M.Put("TKID", Lo)
                LogoutListCLV.AddTextItem($"${M.Get("Os_JobNum")} Rel: ${M.Get("Os_ReleaseNum")}${CRLF}Seq #: ${NumberFormat(M.Get("Os_SeqNum"), 1, 2)} - WC: ${M.Get("Os_WCCode")}"$, M)
                Dim P As B4XView = xui.CreatePanel("")
                P.SetLayoutAnimated(0, 0, 0, LogoutListCLV.AsView.Width, LogoutListCLV.AsView.Height / 10)
                P.LoadLayout("picklogoutbtns")
                P.SetColorAndBorder(xui.Color_ARGB(255, 89, 126, 137), 0, 0, 0)
                #If B4A
                    MP.DCUTs.SetAutoSizeBasedOnText(ViewBtn)
                    MP.DCUTs.SetAutoSizeBasedOnText(LogoutBtn)
                #End If
                ViewBtn.Tag = M
                LogoutBtn.Tag = M
                LogoutListCLV.Add(P, "")
            Next
 

Attachments

  • 1622359616824.png
    1622359616824.png
    5.5 KB · Views: 162

MrKim

Well-Known Member
Licensed User
Longtime User
Try to uncheck the 'handle resize event' in the items layout file.
That did it! Thank you once again Erel.
You know I saw that in another post and I was thinking 'handle resize event' for the designer script being loaded INTO the CLV not the 'handle resize event' for the CLV layout file. It was the word 'items' above that threw me off. If you had said CLV layout file I would have figured it out.

Sigh, So much to remember.
 
Upvote 0
Top