- Home /
EditorWindow - multiple input fields in one row
I would like to have it like here:
But there it only works because it is a Vector3 which takes 3 input fields. I would like to implement it like a little calendar where you can have inputfields for year/month/day in one row. I would like the user to be able to pick a valid date. Is it possible or should I stop dreaming?
Thanks in advance!
You'd need to make a custom editor for that.
(meaning yes, it is definitely possible!)
Answer by Bunny83 · Nov 08, 2011 at 10:20 AM
It's very easy. GUILayout allows you to control how the elements are layouted. All elements you put between GUILayout.BeginHorizontal and GUILayout.EndHorizontal are arranged horizontal.
By default you are in a GUILayout.BeginVertical group, that's why the elements are aranged vertical.
The point is that you can nest those groups to create your whole layout.
Thank you. I am not that good with GUIs and I guess that was the information I was looking for :)
Your answer
Follow this Question
Related Questions
Text.Field erratically updating 0 Answers
textField - disable enter? how to 1 Answer
How does "Input.eatKeyPressOnTextFieldFocus" work on compilation ? 1 Answer
How to slow down GUI 2 Answers
EditorGUI refresh 1 Answer