- Home /
How to change label width of EditorGUILayout.Slider?
Hi,
Im using the EditorGUILayout.Slider. Because some of them have a longer label I would like to customize the width of the label. Unfortunately the solution for "Horizontal sliders" does not seem to apply (adjusting the padding value) because these elements do not accept GUIStyle parameters. I checked the possible styles in "EditorStyles" but did not find a responsible one.
xad
I don't know the answer to this question off the top of my head, but something I've done in the past is to use BeginHorizontal() and EndHorizontal(), and use a separate Label() control for the label (which then allows you to specify the width). But, maybe there's a way to do this directly via the Slider() control (again, I'm not sure off the top of my head what that might be, but if there is an easier solution I'm sure someone will post it).
Your answer
Follow this Question
Related Questions
Intslider, Detection in Sliding Area too long 0 Answers
Initialising List array for use in a custom Editor 1 Answer
EditorGUI.Slider positioning 1 Answer
Slider to object morph 0 Answers
Horizontal Slider Won't Move 1 Answer