B4J Question How to Remove warnings when shape is resized

jmon

Well-Known Member
Licensed User
Longtime User
Hello,

I bumped into a problem that not many may have encountered yet. When I add a shape (any shape, like circle, polygon, rectangle...) to an anchorPane and set the anchors to that anchorPane, I get those warnings:
Child is not resizable: Circle[centerX=0.0, centerY=0.0, radius=20.0, fill=0x000000ff]

I am not trying to resize the control, I just set the right anchor. The issue it that I have 100s of shapes added in anchorpanes and anchored, so I end up having hundreds of lines written in my StdOut (I monitor the stdout and write to file).

I have attached an example that demonstrates the issue, but here is what it does:
B4X:
For i = 1 To 10
    Dim c As JavaObject
    c.InitializeNewInstance("javafx.scene.shape.Circle", Null)
    c.RunMethod("setRadius", Array(20.0))
    ap.AddNode(c, 0, Rnd(0, ap.Height), -1, -1)
    ap.SetRightAnchor(c, Rnd(2, 25))
Next
and I get that:

I was wondering if there was a method like the one to disable CSS warnings for shapes?

Thanks,

Jmon.
 

Attachments

  • ShapeWarnings_Example.zip
    1.3 KB · Views: 174

Daestrum

Expert
Licensed User
Longtime User
Saw a note on Oracles Anchorpane class.
 
Upvote 0

jmon

Well-Known Member
Licensed User
Longtime User
Thanks for your answer.
AnchorPane provides a static method for setting each anchor constraint.
That's what I am doing in this case, I just set the right anchor and it works in the example, just the issue is the message in the stdout.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…