Closed michaelcinquin closed 10 years ago
Sorry I never got back to you!
Stylesheets and controllers cannot share data the way you're attempting here; you'll need to apply styles, or set different style names, from your controller.
That said, using constraints you should be able to refer to the text field height; it will calculate the best height similarly to how you are calling sizeToFit
Hi
if I do in the controller :
myTextField=NSTextField.new myTextField.title="some long text" myTextField.sizeToFit
@myView=subview(NSView, :myView) do @myTextField=subview(myTextField, :styleTextField) end
In the stylesheet, is it possible to get @myTextField.frame.size.height, so as to be able to set the height of :myView ?
I want to use subviews to work with Constraints.
Hope the question makes sense and you can look into it