[ Spec ]How can I get input and field with a fixed height?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[ Spec ]How can I get input and field with a fixed height?

Stephane Ducasse-3
Hi

I would like to be able to get combo box, input field with a fixed height.
Any ideas?

Stef

Screen Shot 2017-09-29 at 21.22.59.png (30K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ Spec ]How can I get input and field with a fixed height?

Peter Uhnak
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 <[hidden email]> wrote:
Hi

I would like to be able to get combo box, input field with a fixed height.
Any ideas?

Stef

Reply | Threaded
Open this post in threaded view
|

Re: [ Spec ]How can I get input and field with a fixed height?

Stephane Ducasse-3
Thanks a lot. I was rereading the book for that.


On Fri, Sep 29, 2017 at 10:36 PM, Peter Uhnák <[hidden email]> 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 <[hidden email]>
> wrote:
>>
>> Hi
>>
>> I would like to be able to get combo box, input field with a fixed height.
>> Any ideas?
>>
>> Stef
>
>