B4J Question B4XView with zero height gets same height as its width - why?

Sandman

Expert
Licensed User
Longtime User
I have a pane in a layout.

If I dim the pane as Pane and via code set its height to 0, the height is 0 - as expected.

If I dim the pane as B4XView and via code set its height to 0, the height is automatically set to same as width - making it a square.

Is this the expected and documented behaviour? I'm very confused, because the same code in B4A actually sets the height to 0. (I think I might have seen that it got square in B4i also.)
 

Sandman

Expert
Licensed User
Longtime User
Update: I've now verified using B4A and B4i, and neither of those display this behaviour. It's only B4J that makes a pane square if one sets its height to zero. Interestingly this does not happen if I instead set the width to zero.

I'm guessing this is either a feature (using the definition loosely here) of JavaFX or an actual bug in the B4XView implementation.
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
Yeah, I thought that might be it. I searched their documention to the best of my abilities before creating the thread and came up empty. I'm not asking you to waste time to google it for me, but if you easily know where I can read about this I'd appreciate a link.

(This is the second time I've heard/encountered something in JavaFX where surprising things happens when one set a special value. It would be nice to know how/where to look if/when I encounter more of their "helpful" "features".)
 
Upvote 0
Top