I actually just came up with a solution to my issu...
# tornadofx
s
I actually just came up with a solution to my issue from yesterday that wasn't suggested anywhere and works great! I made a separate
BorderPane
that contains a
label
with my TitledPane's title, and a separate
hbox
for the icon and the menu. I then bound its prefWidthProperty like this:
prefWidthProperty().bind(this@apply.widthProperty().subtract(Styles.smallishPadding.value*2))
which binds its width to the SqueezeBox's width minus the padding I have added. Then I simply set
contentDisplay = ContentDisplay.GRAPHIC_ONLY
within the fold. It appears to work fine, the buttons are aligned and stick to the right side as intended.
h
Yeah that's pretty much what my example did, though I think it bound min width rather than prefer width.
s
Yeah, the binding is unfortunate but setting the
contentDisplay = ContentDiaplsy.GRAPHIC_ONLY
made it a lot easier than having to deal with the textlabel nestled inside the TitledPane (at least in my case, when using a Squeezebox)
h
Yeah that's what I did, blank/null title then you just create a label for the title yourself
s
d'oh, I must have missed that in the example you posted. 😞 would have saved me some time! that's what I get for coding in the wee hours of the morning
h
NP not fishing for credit just validating the approach 😁