B4J Question CSS

moore_it

Well-Known Member
Licensed User
Longtime User
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.
 

moore_it

Well-Known Member
Licensed User
Longtime User
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

stevel05

Expert
Licensed User
Longtime User
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…