MegatenFreak Active Member Licensed User Mar 24, 2020 #1 Hello. I'm trying to set the alignment to right (or orientation right-to-left) in a JavaFX modal dialog, so the Farsi text is aligned to the right side of the dialog box instead of the left. I tried using CSS: Code: Copy .dialog-pane { -fx-background-color: black; -fx-text-alignment: right; } .dialog-pane .label { -fx-text-fill: yellow; -fx-text-alignment: right; } The color and fill commands work, but the alignment doesn't. I realized I need to set the orientation to RIGHT-TO-LEFT. Searching further, I found a solution in javafx forums that suggested the following code be run: Code: Copy alert.getDialogPane().setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); But I have no idea how to make that happen in B4J... Please help.
Hello. I'm trying to set the alignment to right (or orientation right-to-left) in a JavaFX modal dialog, so the Farsi text is aligned to the right side of the dialog box instead of the left. I tried using CSS: Code: Copy .dialog-pane { -fx-background-color: black; -fx-text-alignment: right; } .dialog-pane .label { -fx-text-fill: yellow; -fx-text-alignment: right; } The color and fill commands work, but the alignment doesn't. I realized I need to set the orientation to RIGHT-TO-LEFT. Searching further, I found a solution in javafx forums that suggested the following code be run: Code: Copy alert.getDialogPane().setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); But I have no idea how to make that happen in B4J... Please help.
Erel B4X founder Staff member Licensed User Longtime User Mar 24, 2020 #2 Use B4XDialog. You can customize it however you like. Upvote 0
MegatenFreak Active Member Licensed User Mar 24, 2020 #3 Wow! That is totally customizable! Thank a lot Upvote 0