B4J Question Compile to Library

derez

Expert
Licensed User
Longtime User
I made a dialog form using modalexample and it works. Then compiled it to library.
When running it as a library I get Error saying that the fxml file is missing, while it is in the "files" directory.
Where should I put it for the library to find it ?
 

derez

Expert
Licensed User
Longtime User
Here, the fxml is in msg.zip
 

Attachments

  • msg.zip
    2.1 KB · Views: 326
  • msg_lib.zip
    3 KB · Views: 317
Upvote 0

derez

Expert
Licensed User
Longtime User
Like you say - it runs in release, fails in debug.
The debug mode issue is fixed for the next update.
:)

Another thing - Radiobutton - when checking it does not remove the check of the other button, I had to do it manually in the events.
B4X:
Sub serverrb_SelectedChange(Selected As Boolean)
If Selected Then clientrb.Selected = False   
End Sub

Sub clientrb_SelectedChange(Selected As Boolean)
If Selected Then serverrb.Selected = False   
End Sub
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
In the scene builder, if you select the radiobuttons you want to group then type a name into the Toggle Group in the properties pane it should
 
Upvote 0

derez

Expert
Licensed User
Longtime User
then type a name into the Toggle Group in the properties pane it should
I don't understand. I managed to group them by arrange-wrap in - group but how to define toggle ?
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
It looks like you can't, even in Java, set the fonts directly by code but need to use CSS styles for TextField and TextArea. In code you can see the existing styles with the read-only StyleClasses property and set them (supposedly - I haven't played with it at all yet!) using the Style property. All nodes support styling but obviously with different options for different nodes. See the CSS Reference Guide here.

You should also be able to set multiple styles in SceneBuilder in the Style box in the Properties pane where you separate individual styles with a semi-colon. I've only briefly played with this but it seems to work as advertised.

There is a lot of JavaFX information on the Oracle JavaFX site
 
Upvote 0

derez

Expert
Licensed User
Longtime User
text.png


But Textinputcontrol does not appear in the scenebuilder...Probably needs more reading.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
TextInputControl is the abstract base class for text input controls. You cannot instantiate it directly. It is inherited by TextArea and TextField which therefore inherit its CCS properties. Look at this line immediately preceding your screen capture.
TextArea has all the properties and pseudo-class state of TextInputControl
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
As Andrew suggested, you can set the font parameters using CSS styling either in the style field in the Scene Builder or in code using Node.Style method. ie.
B4X:
Text1.Style="-fx-font-size: x-large"
sets extra large font.
 
Upvote 0
Top