Bug? [NOT A BUG] B4J Pane vs JavaFX Pane...

Cableguy

Expert
Licensed User
Longtime User
@Magma,

Please don't take it personally... I just don't want you to waste your time.
This is something for Erel
 

Magma

Expert
Licensed User
Longtime User
@Magma,

Please don't take it personally... I just don't want you to waste your time.
This is something for Erel
but all... they are saying (not only in B4X)... is something JavaFX not having... there is a special "command" to do that... borderpane... (may be with inline java can use it)

But anyway... hope you find solution :)

* ofcourse not take it personal...
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
SO.....

After searching for hours (better read "days") for a JFX based solution, or workaround... I returned searching to the B4JForum, with a much targeted search keyword, but a wider selection parameter for which thread to consult...
And I finally understood my issue and found the solution:
First the why it wasn't working:
The Visual Designer follows as much as possible the JFX way of doing things, and so, any view that is created gets automatically the styles for both Border Color and Border Width, both set to 0 (#0000 -> Black, 0px). With these two style strings set, the css stylesheet file got overwritten for those two values... why? because the css file is aplied first, and any styling set either in the visual designer either by code then overrides them.
This meant my css stylesheet file was not at fault... but how to solve this?
@stevel05 had given the solution to this in a unrelated, but still pertinent thread...
We need to delete those preset styles in order for our css stylesheet to be fully aplied.
How? I did it this way:
For Each n As Node In Main.MainForm.RootPane.GetAllViewsRecursive
n.Style = ""
n.StyleClasses.Clear
Next
And there it was!!! my custom defined border!!! YESSS!
 
Last edited:

zed

Active Member
Licensed User
This is called perseverance. Well done man.
You haven't given up anything.
You searched for the information before and after your question until you found the solution yourself.
Good example to follow.
 
Top