B4J Question Rounded corners on BBCodeView

MrKim

Well-Known Member
Licensed User
Longtime User
I have played with this 'till I am blue in the face. Once again, I feel like I must be missing something obvious.
WYSIWYG Designer looks like this - perfect:
1623675399220.png

I run it it looks like this:
1623675696907.png

I add some text I get the blue but also a scroll bar??:
1623675788921.png

I found if I add this line: AboutCV.sv.ScrollViewInnerPanel.SetColorAndBorder(xui.Color_Blue , 5dip, xui.Color_Black , 45dip)
I can get part way there:
1623675994804.png

So, I tried putting the BBCodeView on a pane (B4J) thinking the pane would clip the corners. Once again, it looked great in the wysiwyg designer but did nothing when I run the program, even when I set the color and border on the pane in code.

Project included with lots of remmed code for all the things I tried.
Project is B4x pages, only the B4J project is set up. I was able to resolve this in B4A by setting the Base BackGround ColorDrawable Color to the same color as the background on the page. For some reason this has no affect in B4J.
Any help appreciated.
 

Attachments

  • RoundedCornersIssue.zip
    44.1 KB · Views: 125
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
1623681280371.png



B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    TextEngine.Initialize(Root)
    Dialog.Initialize(Root)
    Dialog.BackgroundColor = 0xFF0028FF
    Dialog.ButtonsColor = 0xFF0028FF
    Dialog.BorderColor = xui.Color_Gray
    Dialog.ButtonsTextColor = xui.Color_White
    Dialog.OverlayColor = xui.Color_Transparent
    Dialog.BorderCornersRadius = 30dip
    Dialog.BorderColor = xui.Color_Transparent
End Sub

Private Sub Button1_Click
    Dim p As B4XView = xui.CreatePanel("")
    p.SetLayoutAnimated(0, 0, 0, 300dip, 300dip)
    p.LoadLayout("BBDialog")
    BBCodeView1.TextEngine = TextEngine
    Dim sv As ScrollPane = BBCodeView1.sv
    sv.SetVScrollVisibility("NEVER")
    BBCodeView1.Text = $"[color=white][TextSize=18]jk lfsdjf lksdjf lksdf
weklfjwklefjklwef asdasdasd
wefjwlekf [b]jklwef w[/b] [color=yellow]asdasdasd[/color]
efwjelk fwklefj [u]wlkef jwlkefwlekf jwelfw[/u]
ef wjeklf jwelkf [/TextSize][/color]"$
    Dim rs As Object = Dialog.ShowCustom(p, "Setup", "", "")
    Dim btn As B4XView = Dialog.GetButton(xui.DialogResponse_Positive)
    btn.Left = btn.Left - 10dip
    Wait For (rs) Complete (Result As Int)
End Sub
 

Attachments

  • Project.zip
    9.7 KB · Views: 133
Upvote 0
Top