moore_it Well-Known Member Licensed User Longtime User Jul 30, 2018 #1 Hi all, it's possible to set dinamically width of a control in an CSS text file. /* ChoiceBox */ .choice-box { -fx-pref-width: 220; } .choice-box .context-menu{ -fx-pref-width: 216; } Thanks in advice.
Hi all, it's possible to set dinamically width of a control in an CSS text file. /* ChoiceBox */ .choice-box { -fx-pref-width: 220; } .choice-box .context-menu{ -fx-pref-width: 216; } Thanks in advice.
Erel B4X founder Staff member Licensed User Longtime User Jul 30, 2018 #2 You can build the CSS file programmatically and load it. Upvote 0
stevel05 Expert Licensed User Longtime User Jul 30, 2018 #3 Css reference is here : https://docs.oracle.com/javase/8/javafx/api/javafx/scene/doc-files/cssref.html#node It appears that the only view you can set the width on is the WebView. Why would you want to set the width in CSS? Upvote 0
Css reference is here : https://docs.oracle.com/javase/8/javafx/api/javafx/scene/doc-files/cssref.html#node It appears that the only view you can set the width on is the WebView. Why would you want to set the width in CSS?
moore_it Well-Known Member Licensed User Longtime User Jul 30, 2018 #4 the width of context menu of choicebox is like the width of the text but not the choicebox, i want the widths of chicebox and the contetxt menu are equal. Upvote 0
the width of context menu of choicebox is like the width of the text but not the choicebox, i want the widths of chicebox and the contetxt menu are equal.
stevel05 Expert Licensed User Longtime User Jul 30, 2018 #5 Try using combobox instead, it appears that the items are rendered at least as wide as the control and you can add nodes if needed. Upvote 0
Try using combobox instead, it appears that the items are rendered at least as wide as the control and you can add nodes if needed.
moore_it Well-Known Member Licensed User Longtime User Jul 30, 2018 #6 Yes with combox i've what i want ! Many Thanks Stevel05 Upvote 0