Spec: how to add borders

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

Spec: how to add borders

Mark Rizun
Hi,

I want to have a border around, for example, two TextModel(s) and one ButtonModel.
Is it possible to do just with Spec or I have to do it some other way?

Best regards,
Mark
Reply | Threaded
Open this post in threaded view
|

Re: Spec: how to add borders

Piotr Klibert
I don't know if Spec exposes this in any way, but you can do this via sending

button widget widget borderWidth: 2

to your model. The "widget widget" part is because there's also a
MorphicAdapter between a model and a real Morph.

I didn't check this, but it's possible you will need to do this
*after* the window is rendered and shown, in which case you have a
#whenBuiltDo: method on ComposableModel for this.



Best regards,
Piotr Klibert


2015-01-21 11:48 GMT+01:00 Mark Rizun <[hidden email]>:

> Hi,
>
> I want to have a border around, for example, two TextModel(s) and one
> ButtonModel.
> Is it possible to do just with Spec or I have to do it some other way?
>
> Best regards,
> Mark
>
>
>
> --
> View this message in context: http://forum.world.st/Spec-how-to-add-borders-tp4800778.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: Spec: how to add borders

Mark Rizun
Good to know, thanks.

2015-01-21 22:53 GMT+01:00 Piotr Klibert <[hidden email]>:
I don't know if Spec exposes this in any way, but you can do this via sending

button widget widget borderWidth: 2

to your model. The "widget widget" part is because there's also a
MorphicAdapter between a model and a real Morph.

I didn't check this, but it's possible you will need to do this
*after* the window is rendered and shown, in which case you have a
#whenBuiltDo: method on ComposableModel for this.



Best regards,
Piotr Klibert


2015-01-21 11:48 GMT+01:00 Mark Rizun <[hidden email]>:
> Hi,
>
> I want to have a border around, for example, two TextModel(s) and one
> ButtonModel.
> Is it possible to do just with Spec or I have to do it some other way?
>
> Best regards,
> Mark
>
>
>
> --
> View this message in context: http://forum.world.st/Spec-how-to-add-borders-tp4800778.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>