[ Spec ]How can I get input and field with a fixed height?
Hi I would like to be able to get combo box, input field with a fixed height. Any ideas? Stef
You can say `add:height:` in the layout. You also have to add an empty row at the end that will take the remaining of the space, because otherwise the input fields will fill the window. ``` ui := DynamicComposableModel new. ui instantiateModels: #( gameName TextInputFieldModel platform DropListModel finished CheckBoxModel description TextModel ). layout := SpecColumnLayout composed add: #gameName height: ComposableModel inputTextHeight; add: #platform height: ComposableModel inputTextHeight; add: #finished height: ComposableModel inputTextHeight; add: #description height: ComposableModel inputTextHeight * 4; newRow: [ :r | ]; yourself. ui openWithSpecLayout: layout. ``` Peter On Fri, Sep 29, 2017 at 9:23 PM, Stephane Ducasse <stepharo.self@gmail.com> wrote:
Hi
I would like to be able to get combo box, input field with a fixed height. Any ideas?
Stef
Thanks a lot. I was rereading the book for that. On Fri, Sep 29, 2017 at 10:36 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
You can say `add:height:` in the layout.
You also have to add an empty row at the end that will take the remaining of the space, because otherwise the input fields will fill the window.
``` ui := DynamicComposableModel new. ui instantiateModels: #( gameName TextInputFieldModel platform DropListModel finished CheckBoxModel description TextModel ).
layout := SpecColumnLayout composed add: #gameName height: ComposableModel inputTextHeight; add: #platform height: ComposableModel inputTextHeight; add: #finished height: ComposableModel inputTextHeight; add: #description height: ComposableModel inputTextHeight * 4; newRow: [ :r | ]; yourself.
ui openWithSpecLayout: layout. ```
Peter
On Fri, Sep 29, 2017 at 9:23 PM, Stephane Ducasse <stepharo.self@gmail.com> wrote:
Hi
I would like to be able to get combo box, input field with a fixed height. Any ideas?
Stef
participants (2)
-
Peter Uhnák -
Stephane Ducasse