aligning morphs

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

aligning morphs

Tudor Girba

Hi,

I would need help with understanding the magic behind alignment in Morphic.

Take the example from below. Could anyone help me with what I should do to have the morph stretch all the way horizontally?

| scroll window morph |
scroll := ScrollPane new.
scroll
        fillStyle: (SolidFillStyle color: Color blue);
        vResizing: #spaceFill;
        hResizing: #spaceFill.
morph := PanelMorph new.
morph
        fillStyle: (SolidFillStyle color: Color yellow);
        changeTableLayout;
        listDirection: #topToBottom;
        vResizing: #shrinkWrap;
        hResizing: #spaceFill;
        layoutInset: 10.
morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
scroll scroller addMorph: morph.
window := SystemWindow new.
window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
window openInWorld


Cheers,
Doru


--
www.tudorgirba.com

"Every thing should have the right to be different."




Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Gary Chambers-4
Hi Doru,

#spaceFill constraints are typically only used by table layouts.
ScrollPane is designed for fixed size contents, at present.
Might be nice to extend it to honour any #spaceFill of its single target
morph.
This would simplify usage of scrollers quite a bit!

Regards, Gary

----- Original Message -----
From: "Tudor Girba" <[hidden email]>
To: "[hidden email] Development"
<[hidden email]>
Sent: Saturday, January 08, 2011 1:22 AM
Subject: [Pharo-project] aligning morphs



Hi,

I would need help with understanding the magic behind alignment in Morphic.

Take the example from below. Could anyone help me with what I should do to
have the morph stretch all the way horizontally?

| scroll window morph |
scroll := ScrollPane new.
scroll
fillStyle: (SolidFillStyle color: Color blue);
vResizing: #spaceFill;
hResizing: #spaceFill.
morph := PanelMorph new.
morph
fillStyle: (SolidFillStyle color: Color yellow);
changeTableLayout;
listDirection: #topToBottom;
vResizing: #shrinkWrap;
hResizing: #spaceFill;
layoutInset: 10.
morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
scroll scroller addMorph: morph.
window := SystemWindow new.
window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1
@ 1)).
window openInWorld


Cheers,
Doru


--
www.tudorgirba.com

"Every thing should have the right to be different."





Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Guillermo Polito


On Mon, Jan 10, 2011 at 9:04 AM, Gary Chambers <[hidden email]> wrote:
Hi Doru,

#spaceFill constraints are typically only used by table layouts.
ScrollPane is designed for fixed size contents, at present.

So, maybe morphs should raise an error or a warning in case of an invalid layout...
 
Might be nice to extend it to honour any #spaceFill of its single target morph.
This would simplify usage of scrollers quite a bit!

Regards, Gary

----- Original Message ----- From: "Tudor Girba" <[hidden email]>
To: "[hidden email] Development" <[hidden email]>
Sent: Saturday, January 08, 2011 1:22 AM
Subject: [Pharo-project] aligning morphs




Hi,

I would need help with understanding the magic behind alignment in Morphic.

Take the example from below. Could anyone help me with what I should do to have the morph stretch all the way horizontally?

| scroll window morph |
scroll := ScrollPane new.
scroll
fillStyle: (SolidFillStyle color: Color blue);
vResizing: #spaceFill;
hResizing: #spaceFill.
morph := PanelMorph new.
morph
fillStyle: (SolidFillStyle color: Color yellow);
changeTableLayout;
listDirection: #topToBottom;
vResizing: #shrinkWrap;
hResizing: #spaceFill;
layoutInset: 10.
morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
scroll scroller addMorph: morph.
window := SystemWindow new.
window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
window openInWorld


Cheers,
Doru


--
www.tudorgirba.com

"Every thing should have the right to be different."






Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Gary Chambers-4
Not strictly an error, just need to be aware of which options are used in which context...

Regards, Gary
----- Original Message -----
Sent: Monday, January 10, 2011 1:01 PM
Subject: Re: [Pharo-project] aligning morphs



On Mon, Jan 10, 2011 at 9:04 AM, Gary Chambers <[hidden email]> wrote:
Hi Doru,

#spaceFill constraints are typically only used by table layouts.
ScrollPane is designed for fixed size contents, at present.

So, maybe morphs should raise an error or a warning in case of an invalid layout...
 
Might be nice to extend it to honour any #spaceFill of its single target morph.
This would simplify usage of scrollers quite a bit!

Regards, Gary

----- Original Message ----- From: "Tudor Girba" <[hidden email]>
To: "[hidden email] Development" <[hidden email]>
Sent: Saturday, January 08, 2011 1:22 AM
Subject: [Pharo-project] aligning morphs




Hi,

I would need help with understanding the magic behind alignment in Morphic.

Take the example from below. Could anyone help me with what I should do to have the morph stretch all the way horizontally?

| scroll window morph |
scroll := ScrollPane new.
scroll
fillStyle: (SolidFillStyle color: Color blue);
vResizing: #spaceFill;
hResizing: #spaceFill.
morph := PanelMorph new.
morph
fillStyle: (SolidFillStyle color: Color yellow);
changeTableLayout;
listDirection: #topToBottom;
vResizing: #shrinkWrap;
hResizing: #spaceFill;
layoutInset: 10.
morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
scroll scroller addMorph: morph.
window := SystemWindow new.
window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
window openInWorld


Cheers,
Doru


--
www.tudorgirba.com

"Every thing should have the right to be different."






Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Tudor Girba
In reply to this post by Gary Chambers-4
Hi Gary,

Thanks for the reply.

So, what would be required for scrollbars to work with spaceFill? I would really need this feature, but I do not know how to go about it.

Could you or anyone else provide some hints? Of course code would be even better. But at this moment hi ts would be helpful, too :)

Cheers,
Doru



On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]> wrote:

> Hi Doru,
>
> #spaceFill constraints are typically only used by table layouts.
> ScrollPane is designed for fixed size contents, at present.
> Might be nice to extend it to honour any #spaceFill of its single target morph.
> This would simplify usage of scrollers quite a bit!
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: "[hidden email] Development" <[hidden email]>
> Sent: Saturday, January 08, 2011 1:22 AM
> Subject: [Pharo-project] aligning morphs
>
>
>
> Hi,
>
> I would need help with understanding the magic behind alignment in Morphic.
>
> Take the example from below. Could anyone help me with what I should do to have the morph stretch all the way horizontally?
>
> | scroll window morph |
> scroll := ScrollPane new.
> scroll
> fillStyle: (SolidFillStyle color: Color blue);
> vResizing: #spaceFill;
> hResizing: #spaceFill.
> morph := PanelMorph new.
> morph
> fillStyle: (SolidFillStyle color: Color yellow);
> changeTableLayout;
> listDirection: #topToBottom;
> vResizing: #shrinkWrap;
> hResizing: #spaceFill;
> layoutInset: 10.
> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
> scroll scroller addMorph: morph.
> window := SystemWindow new.
> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
> window openInWorld
>
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
>
> "Every thing should have the right to be different."
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Gary Chambers-4
I may get time later in the week to have a go with GeneralScrollPane to
support the feature you desire... ;-)

Regards, Gary

----- Original Message -----
From: "Tudor Girba" <[hidden email]>
To: <[hidden email]>
Cc: <[hidden email]>
Sent: Monday, January 10, 2011 2:23 PM
Subject: Re: [Pharo-project] aligning morphs


Hi Gary,

Thanks for the reply.

So, what would be required for scrollbars to work with spaceFill? I would
really need this feature, but I do not know how to go about it.

Could you or anyone else provide some hints? Of course code would be even
better. But at this moment hi ts would be helpful, too :)

Cheers,
Doru



On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]>
wrote:

> Hi Doru,
>
> #spaceFill constraints are typically only used by table layouts.
> ScrollPane is designed for fixed size contents, at present.
> Might be nice to extend it to honour any #spaceFill of its single target
> morph.
> This would simplify usage of scrollers quite a bit!
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: "[hidden email] Development"
> <[hidden email]>
> Sent: Saturday, January 08, 2011 1:22 AM
> Subject: [Pharo-project] aligning morphs
>
>
>
> Hi,
>
> I would need help with understanding the magic behind alignment in
> Morphic.
>
> Take the example from below. Could anyone help me with what I should do to
> have the morph stretch all the way horizontally?
>
> | scroll window morph |
> scroll := ScrollPane new.
> scroll
> fillStyle: (SolidFillStyle color: Color blue);
> vResizing: #spaceFill;
> hResizing: #spaceFill.
> morph := PanelMorph new.
> morph
> fillStyle: (SolidFillStyle color: Color yellow);
> changeTableLayout;
> listDirection: #topToBottom;
> vResizing: #shrinkWrap;
> hResizing: #spaceFill;
> layoutInset: 10.
> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
> scroll scroller addMorph: morph.
> window := SystemWindow new.
> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner:
> 1 @ 1)).
> window openInWorld
>
>
> Cheers,
> Doru
>
>
> --
> www.tudorgirba.com
>
> "Every thing should have the right to be different."
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Stéphane Ducasse
Thanks gary
we should really organize again a coding session at london or lille together so that we continue to clean the UI level.
It was fun to pair program last time.
Stef


On Jan 10, 2011, at 4:50 PM, Gary Chambers wrote:

> I may get time later in the week to have a go with GeneralScrollPane to support the feature you desire... ;-)
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Cc: <[hidden email]>
> Sent: Monday, January 10, 2011 2:23 PM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Hi Gary,
>
> Thanks for the reply.
>
> So, what would be required for scrollbars to work with spaceFill? I would really need this feature, but I do not know how to go about it.
>
> Could you or anyone else provide some hints? Of course code would be even better. But at this moment hi ts would be helpful, too :)
>
> Cheers,
> Doru
>
>
>
> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]> wrote:
>
>> Hi Doru,
>>
>> #spaceFill constraints are typically only used by table layouts.
>> ScrollPane is designed for fixed size contents, at present.
>> Might be nice to extend it to honour any #spaceFill of its single target morph.
>> This would simplify usage of scrollers quite a bit!
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: "[hidden email] Development" <[hidden email]>
>> Sent: Saturday, January 08, 2011 1:22 AM
>> Subject: [Pharo-project] aligning morphs
>>
>>
>>
>> Hi,
>>
>> I would need help with understanding the magic behind alignment in Morphic.
>>
>> Take the example from below. Could anyone help me with what I should do to have the morph stretch all the way horizontally?
>>
>> | scroll window morph |
>> scroll := ScrollPane new.
>> scroll
>> fillStyle: (SolidFillStyle color: Color blue);
>> vResizing: #spaceFill;
>> hResizing: #spaceFill.
>> morph := PanelMorph new.
>> morph
>> fillStyle: (SolidFillStyle color: Color yellow);
>> changeTableLayout;
>> listDirection: #topToBottom;
>> vResizing: #shrinkWrap;
>> hResizing: #spaceFill;
>> layoutInset: 10.
>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>> scroll scroller addMorph: morph.
>> window := SystemWindow new.
>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
>> window openInWorld
>>
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing should have the right to be different."
>>
>>
>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Gary Chambers-4
Indeed... trying to catch up with work at the moment after nice extended
Christmas break!

Aside, as for EventHandlerPlus, that should be upwardly integrated to the
superclass.
(since Google went for unified account it is cumbersome to switch from work
to personal account!)

Regards, Gary

----- Original Message -----
From: "Stéphane Ducasse" <[hidden email]>
To: <[hidden email]>
Sent: Monday, January 10, 2011 5:08 PM
Subject: Re: [Pharo-project] aligning morphs


Thanks gary
we should really organize again a coding session at london or lille together
so that we continue to clean the UI level.
It was fun to pair program last time.
Stef


On Jan 10, 2011, at 4:50 PM, Gary Chambers wrote:

> I may get time later in the week to have a go with GeneralScrollPane to
> support the feature you desire... ;-)
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Cc: <[hidden email]>
> Sent: Monday, January 10, 2011 2:23 PM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Hi Gary,
>
> Thanks for the reply.
>
> So, what would be required for scrollbars to work with spaceFill? I would
> really need this feature, but I do not know how to go about it.
>
> Could you or anyone else provide some hints? Of course code would be even
> better. But at this moment hi ts would be helpful, too :)
>
> Cheers,
> Doru
>
>
>
> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]>
> wrote:
>
>> Hi Doru,
>>
>> #spaceFill constraints are typically only used by table layouts.
>> ScrollPane is designed for fixed size contents, at present.
>> Might be nice to extend it to honour any #spaceFill of its single target
>> morph.
>> This would simplify usage of scrollers quite a bit!
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: "[hidden email] Development"
>> <[hidden email]>
>> Sent: Saturday, January 08, 2011 1:22 AM
>> Subject: [Pharo-project] aligning morphs
>>
>>
>>
>> Hi,
>>
>> I would need help with understanding the magic behind alignment in
>> Morphic.
>>
>> Take the example from below. Could anyone help me with what I should do
>> to have the morph stretch all the way horizontally?
>>
>> | scroll window morph |
>> scroll := ScrollPane new.
>> scroll
>> fillStyle: (SolidFillStyle color: Color blue);
>> vResizing: #spaceFill;
>> hResizing: #spaceFill.
>> morph := PanelMorph new.
>> morph
>> fillStyle: (SolidFillStyle color: Color yellow);
>> changeTableLayout;
>> listDirection: #topToBottom;
>> vResizing: #shrinkWrap;
>> hResizing: #spaceFill;
>> layoutInset: 10.
>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>> scroll scroller addMorph: morph.
>> window := SystemWindow new.
>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner:
>> 1 @ 1)).
>> window openInWorld
>>
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing should have the right to be different."
>>
>>
>>
>>
>>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Tudor Girba
In reply to this post by Gary Chambers-4
Wow, that would be great! I cannot wait to test it.

Cheers,
Doru


On 10 Jan 2011, at 16:50, Gary Chambers wrote:

> I may get time later in the week to have a go with GeneralScrollPane to support the feature you desire... ;-)
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Cc: <[hidden email]>
> Sent: Monday, January 10, 2011 2:23 PM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Hi Gary,
>
> Thanks for the reply.
>
> So, what would be required for scrollbars to work with spaceFill? I would really need this feature, but I do not know how to go about it.
>
> Could you or anyone else provide some hints? Of course code would be even better. But at this moment hi ts would be helpful, too :)
>
> Cheers,
> Doru
>
>
>
> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]> wrote:
>
>> Hi Doru,
>>
>> #spaceFill constraints are typically only used by table layouts.
>> ScrollPane is designed for fixed size contents, at present.
>> Might be nice to extend it to honour any #spaceFill of its single target morph.
>> This would simplify usage of scrollers quite a bit!
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: "[hidden email] Development" <[hidden email]>
>> Sent: Saturday, January 08, 2011 1:22 AM
>> Subject: [Pharo-project] aligning morphs
>>
>>
>>
>> Hi,
>>
>> I would need help with understanding the magic behind alignment in Morphic.
>>
>> Take the example from below. Could anyone help me with what I should do to have the morph stretch all the way horizontally?
>>
>> | scroll window morph |
>> scroll := ScrollPane new.
>> scroll
>> fillStyle: (SolidFillStyle color: Color blue);
>> vResizing: #spaceFill;
>> hResizing: #spaceFill.
>> morph := PanelMorph new.
>> morph
>> fillStyle: (SolidFillStyle color: Color yellow);
>> changeTableLayout;
>> listDirection: #topToBottom;
>> vResizing: #shrinkWrap;
>> hResizing: #spaceFill;
>> layoutInset: 10.
>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>> scroll scroller addMorph: morph.
>> window := SystemWindow new.
>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
>> window openInWorld
>>
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing should have the right to be different."
>>
>>
>>
>>
>>
>
>

--
www.tudorgirba.com

"Problem solving efficiency grows with the abstractness level of problem understanding."




Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Gary Chambers-4
Try the attached change set with the following example...
Let me know if any use and we'll get it integrated.

|m|
m := PanelMorph new.
m
 fillStyle: Color green;
 hResizing: #spaceFill;
 vResizing: #spaceFill;
 changeTableLayout;
 layoutInset: 8.
m addMorph: (Morph new
 height: 160;
 minWidth: 100;
 hResizing: #spaceFill;
 vResizing: #shrinkWrap).
GeneralScrollPane new
 changeScrollerTableLayout;
 scrollTarget: m;
 openInWindow


Regards, Gary

----- Original Message -----
From: "Tudor Girba" <[hidden email]>
To: <[hidden email]>
Sent: Monday, January 10, 2011 8:23 PM
Subject: Re: [Pharo-project] aligning morphs


Wow, that would be great! I cannot wait to test it.

Cheers,
Doru


On 10 Jan 2011, at 16:50, Gary Chambers wrote:

> I may get time later in the week to have a go with GeneralScrollPane to
> support the feature you desire... ;-)
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Cc: <[hidden email]>
> Sent: Monday, January 10, 2011 2:23 PM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Hi Gary,
>
> Thanks for the reply.
>
> So, what would be required for scrollbars to work with spaceFill? I would
> really need this feature, but I do not know how to go about it.
>
> Could you or anyone else provide some hints? Of course code would be even
> better. But at this moment hi ts would be helpful, too :)
>
> Cheers,
> Doru
>
>
>
> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]>
> wrote:
>
>> Hi Doru,
>>
>> #spaceFill constraints are typically only used by table layouts.
>> ScrollPane is designed for fixed size contents, at present.
>> Might be nice to extend it to honour any #spaceFill of its single target
>> morph.
>> This would simplify usage of scrollers quite a bit!
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: "[hidden email] Development"
>> <[hidden email]>
>> Sent: Saturday, January 08, 2011 1:22 AM
>> Subject: [Pharo-project] aligning morphs
>>
>>
>>
>> Hi,
>>
>> I would need help with understanding the magic behind alignment in
>> Morphic.
>>
>> Take the example from below. Could anyone help me with what I should do
>> to have the morph stretch all the way horizontally?
>>
>> | scroll window morph |
>> scroll := ScrollPane new.
>> scroll
>> fillStyle: (SolidFillStyle color: Color blue);
>> vResizing: #spaceFill;
>> hResizing: #spaceFill.
>> morph := PanelMorph new.
>> morph
>> fillStyle: (SolidFillStyle color: Color yellow);
>> changeTableLayout;
>> listDirection: #topToBottom;
>> vResizing: #shrinkWrap;
>> hResizing: #spaceFill;
>> layoutInset: 10.
>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>> scroll scroller addMorph: morph.
>> window := SystemWindow new.
>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner:
>> 1 @ 1)).
>> window openInWorld
>>
>>
>> Cheers,
>> Doru
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing should have the right to be different."
>>
>>
>>
>>
>>
>
>
--
www.tudorgirba.com

"Problem solving efficiency grows with the abstractness level of problem
understanding."




GeneralScrollPaneLayout.1.cs (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Tudor Girba
Excellent!

I tried the example and it works well. I will work with it in the following days.

Cheers,
Doru


On 11 Jan 2011, at 14:39, Gary Chambers wrote:

> Try the attached change set with the following example...
> Let me know if any use and we'll get it integrated.
>
> |m|
> m := PanelMorph new.
> m
> fillStyle: Color green;
> hResizing: #spaceFill;
> vResizing: #spaceFill;
> changeTableLayout;
> layoutInset: 8.
> m addMorph: (Morph new
> height: 160;
> minWidth: 100;
> hResizing: #spaceFill;
> vResizing: #shrinkWrap).
> GeneralScrollPane new
> changeScrollerTableLayout;
> scrollTarget: m;
> openInWindow
>
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, January 10, 2011 8:23 PM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Wow, that would be great! I cannot wait to test it.
>
> Cheers,
> Doru
>
>
> On 10 Jan 2011, at 16:50, Gary Chambers wrote:
>
>> I may get time later in the week to have a go with GeneralScrollPane to support the feature you desire... ;-)
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: <[hidden email]>
>> Cc: <[hidden email]>
>> Sent: Monday, January 10, 2011 2:23 PM
>> Subject: Re: [Pharo-project] aligning morphs
>>
>>
>> Hi Gary,
>>
>> Thanks for the reply.
>>
>> So, what would be required for scrollbars to work with spaceFill? I would really need this feature, but I do not know how to go about it.
>>
>> Could you or anyone else provide some hints? Of course code would be even better. But at this moment hi ts would be helpful, too :)
>>
>> Cheers,
>> Doru
>>
>>
>>
>> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]> wrote:
>>
>>> Hi Doru,
>>>
>>> #spaceFill constraints are typically only used by table layouts.
>>> ScrollPane is designed for fixed size contents, at present.
>>> Might be nice to extend it to honour any #spaceFill of its single target morph.
>>> This would simplify usage of scrollers quite a bit!
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>> To: "[hidden email] Development" <[hidden email]>
>>> Sent: Saturday, January 08, 2011 1:22 AM
>>> Subject: [Pharo-project] aligning morphs
>>>
>>>
>>>
>>> Hi,
>>>
>>> I would need help with understanding the magic behind alignment in Morphic.
>>>
>>> Take the example from below. Could anyone help me with what I should do to have the morph stretch all the way horizontally?
>>>
>>> | scroll window morph |
>>> scroll := ScrollPane new.
>>> scroll
>>> fillStyle: (SolidFillStyle color: Color blue);
>>> vResizing: #spaceFill;
>>> hResizing: #spaceFill.
>>> morph := PanelMorph new.
>>> morph
>>> fillStyle: (SolidFillStyle color: Color yellow);
>>> changeTableLayout;
>>> listDirection: #topToBottom;
>>> vResizing: #shrinkWrap;
>>> hResizing: #spaceFill;
>>> layoutInset: 10.
>>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>>> scroll scroller addMorph: morph.
>>> window := SystemWindow new.
>>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
>>> window openInWorld
>>>
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Every thing should have the right to be different."
>>>
>>>
>>>
>>>
>>>
>>
>>
>
> --
> www.tudorgirba.com
>
> "Problem solving efficiency grows with the abstractness level of problem understanding."
>
>
>
> <GeneralScrollPaneLayout.1.cs>

--
www.tudorgirba.com

"Some battles are better lost than fought."




Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Gary Chambers-4
In reply to this post by Gary Chambers-4
Another interesting example ;-)

|m|
m := PanelMorph new.
m
 hResizing: #spaceFill;
 vResizing: #spaceFill;
 changeTableLayout;
 layoutInset: 8.
m addMorph: FileDialogWindow new newContentMorph.
GeneralScrollPane new
 changeScrollerTableLayout;
 scrollTarget: m;
 openInWindow

Regards, Gary

----- Original Message -----
From: "Gary Chambers" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, January 11, 2011 1:39 PM
Subject: Re: [Pharo-project] aligning morphs


> Try the attached change set with the following example...
> Let me know if any use and we'll get it integrated.
>
> |m|
> m := PanelMorph new.
> m
> fillStyle: Color green;
> hResizing: #spaceFill;
> vResizing: #spaceFill;
> changeTableLayout;
> layoutInset: 8.
> m addMorph: (Morph new
> height: 160;
> minWidth: 100;
> hResizing: #spaceFill;
> vResizing: #shrinkWrap).
> GeneralScrollPane new
> changeScrollerTableLayout;
> scrollTarget: m;
> openInWindow
>
>
> Regards, Gary
>
> ----- Original Message -----
> From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, January 10, 2011 8:23 PM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Wow, that would be great! I cannot wait to test it.
>
> Cheers,
> Doru
>
>
> On 10 Jan 2011, at 16:50, Gary Chambers wrote:
>
>> I may get time later in the week to have a go with GeneralScrollPane to
>> support the feature you desire... ;-)
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: <[hidden email]>
>> Cc: <[hidden email]>
>> Sent: Monday, January 10, 2011 2:23 PM
>> Subject: Re: [Pharo-project] aligning morphs
>>
>>
>> Hi Gary,
>>
>> Thanks for the reply.
>>
>> So, what would be required for scrollbars to work with spaceFill? I would
>> really need this feature, but I do not know how to go about it.
>>
>> Could you or anyone else provide some hints? Of course code would be even
>> better. But at this moment hi ts would be helpful, too :)
>>
>> Cheers,
>> Doru
>>
>>
>>
>> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]>
>> wrote:
>>
>>> Hi Doru,
>>>
>>> #spaceFill constraints are typically only used by table layouts.
>>> ScrollPane is designed for fixed size contents, at present.
>>> Might be nice to extend it to honour any #spaceFill of its single target
>>> morph.
>>> This would simplify usage of scrollers quite a bit!
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>> To: "[hidden email] Development"
>>> <[hidden email]>
>>> Sent: Saturday, January 08, 2011 1:22 AM
>>> Subject: [Pharo-project] aligning morphs
>>>
>>>
>>>
>>> Hi,
>>>
>>> I would need help with understanding the magic behind alignment in
>>> Morphic.
>>>
>>> Take the example from below. Could anyone help me with what I should do
>>> to have the morph stretch all the way horizontally?
>>>
>>> | scroll window morph |
>>> scroll := ScrollPane new.
>>> scroll
>>> fillStyle: (SolidFillStyle color: Color blue);
>>> vResizing: #spaceFill;
>>> hResizing: #spaceFill.
>>> morph := PanelMorph new.
>>> morph
>>> fillStyle: (SolidFillStyle color: Color yellow);
>>> changeTableLayout;
>>> listDirection: #topToBottom;
>>> vResizing: #shrinkWrap;
>>> hResizing: #spaceFill;
>>> layoutInset: 10.
>>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>>> scroll scroller addMorph: morph.
>>> window := SystemWindow new.
>>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0
>>> corner:
>>> 1 @ 1)).
>>> window openInWorld
>>>
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Every thing should have the right to be different."
>>>
>>>
>>>
>>>
>>>
>>
>>
>
> --
> www.tudorgirba.com
>
> "Problem solving efficiency grows with the abstractness level of problem
> understanding."
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Gary Chambers-4
In reply to this post by Tudor Girba
A slight revision as this has highlighted an edge case in the original class
as to when scrollbars are needed...

Regards, Gary

----- Original Message -----
From: "Tudor Girba" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, January 11, 2011 1:53 PM
Subject: Re: [Pharo-project] aligning morphs


Excellent!

I tried the example and it works well. I will work with it in the following
days.

Cheers,
Doru


On 11 Jan 2011, at 14:39, Gary Chambers wrote:

> Try the attached change set with the following example...
> Let me know if any use and we'll get it integrated.
>
> |m|
> m := PanelMorph new.
> m
> fillStyle: Color green;
> hResizing: #spaceFill;
> vResizing: #spaceFill;
> changeTableLayout;
> layoutInset: 8.
> m addMorph: (Morph new
> height: 160;
> minWidth: 100;
> hResizing: #spaceFill;
> vResizing: #shrinkWrap).
> GeneralScrollPane new
> changeScrollerTableLayout;
> scrollTarget: m;
> openInWindow
>
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, January 10, 2011 8:23 PM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Wow, that would be great! I cannot wait to test it.
>
> Cheers,
> Doru
>
>
> On 10 Jan 2011, at 16:50, Gary Chambers wrote:
>
>> I may get time later in the week to have a go with GeneralScrollPane to
>> support the feature you desire... ;-)
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: <[hidden email]>
>> Cc: <[hidden email]>
>> Sent: Monday, January 10, 2011 2:23 PM
>> Subject: Re: [Pharo-project] aligning morphs
>>
>>
>> Hi Gary,
>>
>> Thanks for the reply.
>>
>> So, what would be required for scrollbars to work with spaceFill? I would
>> really need this feature, but I do not know how to go about it.
>>
>> Could you or anyone else provide some hints? Of course code would be even
>> better. But at this moment hi ts would be helpful, too :)
>>
>> Cheers,
>> Doru
>>
>>
>>
>> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]>
>> wrote:
>>
>>> Hi Doru,
>>>
>>> #spaceFill constraints are typically only used by table layouts.
>>> ScrollPane is designed for fixed size contents, at present.
>>> Might be nice to extend it to honour any #spaceFill of its single target
>>> morph.
>>> This would simplify usage of scrollers quite a bit!
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>> To: "[hidden email] Development"
>>> <[hidden email]>
>>> Sent: Saturday, January 08, 2011 1:22 AM
>>> Subject: [Pharo-project] aligning morphs
>>>
>>>
>>>
>>> Hi,
>>>
>>> I would need help with understanding the magic behind alignment in
>>> Morphic.
>>>
>>> Take the example from below. Could anyone help me with what I should do
>>> to have the morph stretch all the way horizontally?
>>>
>>> | scroll window morph |
>>> scroll := ScrollPane new.
>>> scroll
>>> fillStyle: (SolidFillStyle color: Color blue);
>>> vResizing: #spaceFill;
>>> hResizing: #spaceFill.
>>> morph := PanelMorph new.
>>> morph
>>> fillStyle: (SolidFillStyle color: Color yellow);
>>> changeTableLayout;
>>> listDirection: #topToBottom;
>>> vResizing: #shrinkWrap;
>>> hResizing: #spaceFill;
>>> layoutInset: 10.
>>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>>> scroll scroller addMorph: morph.
>>> window := SystemWindow new.
>>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0
>>> corner: 1 @ 1)).
>>> window openInWorld
>>>
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Every thing should have the right to be different."
>>>
>>>
>>>
>>>
>>>
>>
>>
>
> --
> www.tudorgirba.com
>
> "Problem solving efficiency grows with the abstractness level of problem
> understanding."
>
>
>
> <GeneralScrollPaneLayout.1.cs>
--
www.tudorgirba.com

"Some battles are better lost than fought."




GeneralScrollPaneLayout.2.cs (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Tudor Girba
Hi Gary,

I would like to implement a Finder-like behavior the GeneralScrollPane. For this, I would need a way to control the scrolling so that every time I add a new morph, the scroller scrolls (similar to ScrollBar>>animateValue:duration: from OB).

The problem seems to be that the scrollbar value is not updated when I add a new morph. Take a look at the code below. The result of the horizontal scrollbar value at the end is 1.0, while it should be lower. Am I doing something wrong, or is this a problem?

| m scroll |
m := PanelMorph new.
m
        hResizing: #shrinkWrap;
        vResizing: #spaceFill;
        changeTableLayout;
        listDirection: #leftToRight;  
m addMorphBack: (Morph new
                minWidth: 100;
                hResizing: #shrinkWrap;
                vResizing: #spaceFill).
scroll := GeneralScrollPane new
        changeScrollerTableLayout;
        scrollTarget: m.
scroll openInWindow.
scroll hScrollbar setValue: 1.0.
m addMorphBack: (Morph new
                minWidth: 100;
                hResizing: #shrinkWrap;
                vResizing: #spaceFill).
scroll hScrollbar value

==> 1.0

Cheers,
Doru



On 11 Jan 2011, at 15:17, Gary Chambers wrote:

> A slight revision as this has highlighted an edge case in the original class
> as to when scrollbars are needed...
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Sent: Tuesday, January 11, 2011 1:53 PM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Excellent!
>
> I tried the example and it works well. I will work with it in the following days.
>
> Cheers,
> Doru
>
>
> On 11 Jan 2011, at 14:39, Gary Chambers wrote:
>
>> Try the attached change set with the following example...
>> Let me know if any use and we'll get it integrated.
>>
>> |m|
>> m := PanelMorph new.
>> m
>> fillStyle: Color green;
>> hResizing: #spaceFill;
>> vResizing: #spaceFill;
>> changeTableLayout;
>> layoutInset: 8.
>> m addMorph: (Morph new
>> height: 160;
>> minWidth: 100;
>> hResizing: #spaceFill;
>> vResizing: #shrinkWrap).
>> GeneralScrollPane new
>> changeScrollerTableLayout;
>> scrollTarget: m;
>> openInWindow
>>
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Monday, January 10, 2011 8:23 PM
>> Subject: Re: [Pharo-project] aligning morphs
>>
>>
>> Wow, that would be great! I cannot wait to test it.
>>
>> Cheers,
>> Doru
>>
>>
>> On 10 Jan 2011, at 16:50, Gary Chambers wrote:
>>
>>> I may get time later in the week to have a go with GeneralScrollPane to support the feature you desire... ;-)
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>> To: <[hidden email]>
>>> Cc: <[hidden email]>
>>> Sent: Monday, January 10, 2011 2:23 PM
>>> Subject: Re: [Pharo-project] aligning morphs
>>>
>>>
>>> Hi Gary,
>>>
>>> Thanks for the reply.
>>>
>>> So, what would be required for scrollbars to work with spaceFill? I would really need this feature, but I do not know how to go about it.
>>>
>>> Could you or anyone else provide some hints? Of course code would be even better. But at this moment hi ts would be helpful, too :)
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>>
>>> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]> wrote:
>>>
>>>> Hi Doru,
>>>>
>>>> #spaceFill constraints are typically only used by table layouts.
>>>> ScrollPane is designed for fixed size contents, at present.
>>>> Might be nice to extend it to honour any #spaceFill of its single target morph.
>>>> This would simplify usage of scrollers quite a bit!
>>>>
>>>> Regards, Gary
>>>>
>>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>>> To: "[hidden email] Development" <[hidden email]>
>>>> Sent: Saturday, January 08, 2011 1:22 AM
>>>> Subject: [Pharo-project] aligning morphs
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I would need help with understanding the magic behind alignment in Morphic.
>>>>
>>>> Take the example from below. Could anyone help me with what I should do to have the morph stretch all the way horizontally?
>>>>
>>>> | scroll window morph |
>>>> scroll := ScrollPane new.
>>>> scroll
>>>> fillStyle: (SolidFillStyle color: Color blue);
>>>> vResizing: #spaceFill;
>>>> hResizing: #spaceFill.
>>>> morph := PanelMorph new.
>>>> morph
>>>> fillStyle: (SolidFillStyle color: Color yellow);
>>>> changeTableLayout;
>>>> listDirection: #topToBottom;
>>>> vResizing: #shrinkWrap;
>>>> hResizing: #spaceFill;
>>>> layoutInset: 10.
>>>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>>>> scroll scroller addMorph: morph.
>>>> window := SystemWindow new.
>>>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
>>>> window openInWorld
>>>>
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>>
>>>> "Every thing should have the right to be different."
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Problem solving efficiency grows with the abstractness level of problem understanding."
>>
>>
>>
>> <GeneralScrollPaneLayout.1.cs>
>
> --
> www.tudorgirba.com
>
> "Some battles are better lost than fought."
>
>
>
> <GeneralScrollPaneLayout.2.cs>

--
www.tudorgirba.com

"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."




Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Gary Chambers-4
It seems you are asking for the scroll value before the layout has been
calculated.
(since the window hasn't received a fullbounds yet).


| m scroll |
m := PanelMorph new.
m
hResizing: #shrinkWrap;
vResizing: #spaceFill;
changeTableLayout;
listDirection: #leftToRight.
m addMorphBack: (Morph new
minWidth: 100;
hResizing: #shrinkWrap;
vResizing: #spaceFill).
scroll := GeneralScrollPane new
changeScrollerTableLayout;
scrollTarget: m.
scroll openInWindow.
scroll hScrollbar setValue: 1.0.
m addMorphBack: (Morph new
minWidth: 100;
hResizing: #shrinkWrap;
vResizing: #spaceFill).
    "Recalculate bounds now for this example... not generally needed for
normal code!"
scroll fullBounds.
    "****"
scroll hScrollbar value

Is not normally an issue, as you can see from inspecting the scroller after
being opened.

Regards, Gary

----- Original Message -----
From: "Tudor Girba" <[hidden email]>
To: <[hidden email]>
Sent: Sunday, January 16, 2011 10:56 AM
Subject: Re: [Pharo-project] aligning morphs


Hi Gary,

I would like to implement a Finder-like behavior the GeneralScrollPane. For
this, I would need a way to control the scrolling so that every time I add a
new morph, the scroller scrolls (similar to
ScrollBar>>animateValue:duration: from OB).

The problem seems to be that the scrollbar value is not updated when I add a
new morph. Take a look at the code below. The result of the horizontal
scrollbar value at the end is 1.0, while it should be lower. Am I doing
something wrong, or is this a problem?

| m scroll |
m := PanelMorph new.
m
hResizing: #shrinkWrap;
vResizing: #spaceFill;
changeTableLayout;
listDirection: #leftToRight;
m addMorphBack: (Morph new
minWidth: 100;
hResizing: #shrinkWrap;
vResizing: #spaceFill).
scroll := GeneralScrollPane new
changeScrollerTableLayout;
scrollTarget: m.
scroll openInWindow.
scroll hScrollbar setValue: 1.0.
m addMorphBack: (Morph new
minWidth: 100;
hResizing: #shrinkWrap;
vResizing: #spaceFill).
scroll hScrollbar value

==> 1.0

Cheers,
Doru



On 11 Jan 2011, at 15:17, Gary Chambers wrote:

> A slight revision as this has highlighted an edge case in the original
> class
> as to when scrollbars are needed...
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Sent: Tuesday, January 11, 2011 1:53 PM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Excellent!
>
> I tried the example and it works well. I will work with it in the
> following days.
>
> Cheers,
> Doru
>
>
> On 11 Jan 2011, at 14:39, Gary Chambers wrote:
>
>> Try the attached change set with the following example...
>> Let me know if any use and we'll get it integrated.
>>
>> |m|
>> m := PanelMorph new.
>> m
>> fillStyle: Color green;
>> hResizing: #spaceFill;
>> vResizing: #spaceFill;
>> changeTableLayout;
>> layoutInset: 8.
>> m addMorph: (Morph new
>> height: 160;
>> minWidth: 100;
>> hResizing: #spaceFill;
>> vResizing: #shrinkWrap).
>> GeneralScrollPane new
>> changeScrollerTableLayout;
>> scrollTarget: m;
>> openInWindow
>>
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Monday, January 10, 2011 8:23 PM
>> Subject: Re: [Pharo-project] aligning morphs
>>
>>
>> Wow, that would be great! I cannot wait to test it.
>>
>> Cheers,
>> Doru
>>
>>
>> On 10 Jan 2011, at 16:50, Gary Chambers wrote:
>>
>>> I may get time later in the week to have a go with GeneralScrollPane to
>>> support the feature you desire... ;-)
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>> To: <[hidden email]>
>>> Cc: <[hidden email]>
>>> Sent: Monday, January 10, 2011 2:23 PM
>>> Subject: Re: [Pharo-project] aligning morphs
>>>
>>>
>>> Hi Gary,
>>>
>>> Thanks for the reply.
>>>
>>> So, what would be required for scrollbars to work with spaceFill? I
>>> would really need this feature, but I do not know how to go about it.
>>>
>>> Could you or anyone else provide some hints? Of course code would be
>>> even better. But at this moment hi ts would be helpful, too :)
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>>
>>> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]>
>>> wrote:
>>>
>>>> Hi Doru,
>>>>
>>>> #spaceFill constraints are typically only used by table layouts.
>>>> ScrollPane is designed for fixed size contents, at present.
>>>> Might be nice to extend it to honour any #spaceFill of its single
>>>> target morph.
>>>> This would simplify usage of scrollers quite a bit!
>>>>
>>>> Regards, Gary
>>>>
>>>> ----- Original Message ----- From: "Tudor Girba"
>>>> <[hidden email]>
>>>> To: "[hidden email] Development"
>>>> <[hidden email]>
>>>> Sent: Saturday, January 08, 2011 1:22 AM
>>>> Subject: [Pharo-project] aligning morphs
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I would need help with understanding the magic behind alignment in
>>>> Morphic.
>>>>
>>>> Take the example from below. Could anyone help me with what I should do
>>>> to have the morph stretch all the way horizontally?
>>>>
>>>> | scroll window morph |
>>>> scroll := ScrollPane new.
>>>> scroll
>>>> fillStyle: (SolidFillStyle color: Color blue);
>>>> vResizing: #spaceFill;
>>>> hResizing: #spaceFill.
>>>> morph := PanelMorph new.
>>>> morph
>>>> fillStyle: (SolidFillStyle color: Color yellow);
>>>> changeTableLayout;
>>>> listDirection: #topToBottom;
>>>> vResizing: #shrinkWrap;
>>>> hResizing: #spaceFill;
>>>> layoutInset: 10.
>>>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>>>> scroll scroller addMorph: morph.
>>>> window := SystemWindow new.
>>>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0
>>>> corner: 1 @ 1)).
>>>> window openInWorld
>>>>
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>>
>>>> "Every thing should have the right to be different."
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Problem solving efficiency grows with the abstractness level of problem
>> understanding."
>>
>>
>>
>> <GeneralScrollPaneLayout.1.cs>
>
> --
> www.tudorgirba.com
>
> "Some battles are better lost than fought."
>
>
>
> <GeneralScrollPaneLayout.2.cs>

--
www.tudorgirba.com

"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."





Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Tudor Girba
Hi Gary,

Did you publish the changes to GeneralScrollPane somewhere?

Cheers,
Doru


On 17 Jan 2011, at 12:07, Gary Chambers wrote:

> It seems you are asking for the scroll value before the layout has been calculated.
> (since the window hasn't received a fullbounds yet).
>
>
> | m scroll |
> m := PanelMorph new.
> m
> hResizing: #shrinkWrap;
> vResizing: #spaceFill;
> changeTableLayout;
> listDirection: #leftToRight.
> m addMorphBack: (Morph new
> minWidth: 100;
> hResizing: #shrinkWrap;
> vResizing: #spaceFill).
> scroll := GeneralScrollPane new
> changeScrollerTableLayout;
> scrollTarget: m.
> scroll openInWindow.
> scroll hScrollbar setValue: 1.0.
> m addMorphBack: (Morph new
> minWidth: 100;
> hResizing: #shrinkWrap;
> vResizing: #spaceFill).
>   "Recalculate bounds now for this example... not generally needed for normal code!"
> scroll fullBounds.
>   "****"
> scroll hScrollbar value
>
> Is not normally an issue, as you can see from inspecting the scroller after being opened.
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Sent: Sunday, January 16, 2011 10:56 AM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Hi Gary,
>
> I would like to implement a Finder-like behavior the GeneralScrollPane. For this, I would need a way to control the scrolling so that every time I add a new morph, the scroller scrolls (similar to ScrollBar>>animateValue:duration: from OB).
>
> The problem seems to be that the scrollbar value is not updated when I add a new morph. Take a look at the code below. The result of the horizontal scrollbar value at the end is 1.0, while it should be lower. Am I doing something wrong, or is this a problem?
>
> | m scroll |
> m := PanelMorph new.
> m
> hResizing: #shrinkWrap;
> vResizing: #spaceFill;
> changeTableLayout;
> listDirection: #leftToRight;
> m addMorphBack: (Morph new
> minWidth: 100;
> hResizing: #shrinkWrap;
> vResizing: #spaceFill).
> scroll := GeneralScrollPane new
> changeScrollerTableLayout;
> scrollTarget: m.
> scroll openInWindow.
> scroll hScrollbar setValue: 1.0.
> m addMorphBack: (Morph new
> minWidth: 100;
> hResizing: #shrinkWrap;
> vResizing: #spaceFill).
> scroll hScrollbar value
>
> ==> 1.0
>
> Cheers,
> Doru
>
>
>
> On 11 Jan 2011, at 15:17, Gary Chambers wrote:
>
>> A slight revision as this has highlighted an edge case in the original class
>> as to when scrollbars are needed...
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Tuesday, January 11, 2011 1:53 PM
>> Subject: Re: [Pharo-project] aligning morphs
>>
>>
>> Excellent!
>>
>> I tried the example and it works well. I will work with it in the following days.
>>
>> Cheers,
>> Doru
>>
>>
>> On 11 Jan 2011, at 14:39, Gary Chambers wrote:
>>
>>> Try the attached change set with the following example...
>>> Let me know if any use and we'll get it integrated.
>>>
>>> |m|
>>> m := PanelMorph new.
>>> m
>>> fillStyle: Color green;
>>> hResizing: #spaceFill;
>>> vResizing: #spaceFill;
>>> changeTableLayout;
>>> layoutInset: 8.
>>> m addMorph: (Morph new
>>> height: 160;
>>> minWidth: 100;
>>> hResizing: #spaceFill;
>>> vResizing: #shrinkWrap).
>>> GeneralScrollPane new
>>> changeScrollerTableLayout;
>>> scrollTarget: m;
>>> openInWindow
>>>
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>> To: <[hidden email]>
>>> Sent: Monday, January 10, 2011 8:23 PM
>>> Subject: Re: [Pharo-project] aligning morphs
>>>
>>>
>>> Wow, that would be great! I cannot wait to test it.
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> On 10 Jan 2011, at 16:50, Gary Chambers wrote:
>>>
>>>> I may get time later in the week to have a go with GeneralScrollPane to support the feature you desire... ;-)
>>>>
>>>> Regards, Gary
>>>>
>>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>>> To: <[hidden email]>
>>>> Cc: <[hidden email]>
>>>> Sent: Monday, January 10, 2011 2:23 PM
>>>> Subject: Re: [Pharo-project] aligning morphs
>>>>
>>>>
>>>> Hi Gary,
>>>>
>>>> Thanks for the reply.
>>>>
>>>> So, what would be required for scrollbars to work with spaceFill? I would really need this feature, but I do not know how to go about it.
>>>>
>>>> Could you or anyone else provide some hints? Of course code would be even better. But at this moment hi ts would be helpful, too :)
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>>
>>>> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]> wrote:
>>>>
>>>>> Hi Doru,
>>>>>
>>>>> #spaceFill constraints are typically only used by table layouts.
>>>>> ScrollPane is designed for fixed size contents, at present.
>>>>> Might be nice to extend it to honour any #spaceFill of its single target morph.
>>>>> This would simplify usage of scrollers quite a bit!
>>>>>
>>>>> Regards, Gary
>>>>>
>>>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>>>> To: "[hidden email] Development" <[hidden email]>
>>>>> Sent: Saturday, January 08, 2011 1:22 AM
>>>>> Subject: [Pharo-project] aligning morphs
>>>>>
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> I would need help with understanding the magic behind alignment in Morphic.
>>>>>
>>>>> Take the example from below. Could anyone help me with what I should do to have the morph stretch all the way horizontally?
>>>>>
>>>>> | scroll window morph |
>>>>> scroll := ScrollPane new.
>>>>> scroll
>>>>> fillStyle: (SolidFillStyle color: Color blue);
>>>>> vResizing: #spaceFill;
>>>>> hResizing: #spaceFill.
>>>>> morph := PanelMorph new.
>>>>> morph
>>>>> fillStyle: (SolidFillStyle color: Color yellow);
>>>>> changeTableLayout;
>>>>> listDirection: #topToBottom;
>>>>> vResizing: #shrinkWrap;
>>>>> hResizing: #spaceFill;
>>>>> layoutInset: 10.
>>>>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>>>>> scroll scroller addMorph: morph.
>>>>> window := SystemWindow new.
>>>>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
>>>>> window openInWorld
>>>>>
>>>>>
>>>>> Cheers,
>>>>> Doru
>>>>>
>>>>>
>>>>> --
>>>>> www.tudorgirba.com
>>>>>
>>>>> "Every thing should have the right to be different."
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Problem solving efficiency grows with the abstractness level of problem understanding."
>>>
>>>
>>>
>>> <GeneralScrollPaneLayout.1.cs>
>>
>> --
>> www.tudorgirba.com
>>
>> "Some battles are better lost than fought."
>>
>>
>>
>> <GeneralScrollPaneLayout.2.cs>
>
> --
> www.tudorgirba.com
>
> "In a world where everything is moving ever faster,
> one might have better chances to win by moving slower."
>
>
>
>
>

--
www.tudorgirba.com

"To lead is not to demand things, it is to make them happen."




Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Gary Chambers-4
Not yet. (gmail issues) .Go ahead though if you wish.

Regards, Gary

----- Original Message -----
From: "Tudor Girba" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, January 18, 2011 7:44 PM
Subject: Re: [Pharo-project] aligning morphs


Hi Gary,

Did you publish the changes to GeneralScrollPane somewhere?

Cheers,
Doru


On 17 Jan 2011, at 12:07, Gary Chambers wrote:

> It seems you are asking for the scroll value before the layout has been
> calculated.
> (since the window hasn't received a fullbounds yet).
>
>
> | m scroll |
> m := PanelMorph new.
> m
> hResizing: #shrinkWrap;
> vResizing: #spaceFill;
> changeTableLayout;
> listDirection: #leftToRight.
> m addMorphBack: (Morph new
> minWidth: 100;
> hResizing: #shrinkWrap;
> vResizing: #spaceFill).
> scroll := GeneralScrollPane new
> changeScrollerTableLayout;
> scrollTarget: m.
> scroll openInWindow.
> scroll hScrollbar setValue: 1.0.
> m addMorphBack: (Morph new
> minWidth: 100;
> hResizing: #shrinkWrap;
> vResizing: #spaceFill).
>   "Recalculate bounds now for this example... not generally needed for
> normal code!"
> scroll fullBounds.
>   "****"
> scroll hScrollbar value
>
> Is not normally an issue, as you can see from inspecting the scroller
> after being opened.
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Sent: Sunday, January 16, 2011 10:56 AM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Hi Gary,
>
> I would like to implement a Finder-like behavior the GeneralScrollPane.
> For this, I would need a way to control the scrolling so that every time I
> add a new morph, the scroller scrolls (similar to
> ScrollBar>>animateValue:duration: from OB).
>
> The problem seems to be that the scrollbar value is not updated when I add
> a new morph. Take a look at the code below. The result of the horizontal
> scrollbar value at the end is 1.0, while it should be lower. Am I doing
> something wrong, or is this a problem?
>
> | m scroll |
> m := PanelMorph new.
> m
> hResizing: #shrinkWrap;
> vResizing: #spaceFill;
> changeTableLayout;
> listDirection: #leftToRight;
> m addMorphBack: (Morph new
> minWidth: 100;
> hResizing: #shrinkWrap;
> vResizing: #spaceFill).
> scroll := GeneralScrollPane new
> changeScrollerTableLayout;
> scrollTarget: m.
> scroll openInWindow.
> scroll hScrollbar setValue: 1.0.
> m addMorphBack: (Morph new
> minWidth: 100;
> hResizing: #shrinkWrap;
> vResizing: #spaceFill).
> scroll hScrollbar value
>
> ==> 1.0
>
> Cheers,
> Doru
>
>
>
> On 11 Jan 2011, at 15:17, Gary Chambers wrote:
>
>> A slight revision as this has highlighted an edge case in the original
>> class
>> as to when scrollbars are needed...
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Tuesday, January 11, 2011 1:53 PM
>> Subject: Re: [Pharo-project] aligning morphs
>>
>>
>> Excellent!
>>
>> I tried the example and it works well. I will work with it in the
>> following days.
>>
>> Cheers,
>> Doru
>>
>>
>> On 11 Jan 2011, at 14:39, Gary Chambers wrote:
>>
>>> Try the attached change set with the following example...
>>> Let me know if any use and we'll get it integrated.
>>>
>>> |m|
>>> m := PanelMorph new.
>>> m
>>> fillStyle: Color green;
>>> hResizing: #spaceFill;
>>> vResizing: #spaceFill;
>>> changeTableLayout;
>>> layoutInset: 8.
>>> m addMorph: (Morph new
>>> height: 160;
>>> minWidth: 100;
>>> hResizing: #spaceFill;
>>> vResizing: #shrinkWrap).
>>> GeneralScrollPane new
>>> changeScrollerTableLayout;
>>> scrollTarget: m;
>>> openInWindow
>>>
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>> To: <[hidden email]>
>>> Sent: Monday, January 10, 2011 8:23 PM
>>> Subject: Re: [Pharo-project] aligning morphs
>>>
>>>
>>> Wow, that would be great! I cannot wait to test it.
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> On 10 Jan 2011, at 16:50, Gary Chambers wrote:
>>>
>>>> I may get time later in the week to have a go with GeneralScrollPane to
>>>> support the feature you desire... ;-)
>>>>
>>>> Regards, Gary
>>>>
>>>> ----- Original Message ----- From: "Tudor Girba"
>>>> <[hidden email]>
>>>> To: <[hidden email]>
>>>> Cc: <[hidden email]>
>>>> Sent: Monday, January 10, 2011 2:23 PM
>>>> Subject: Re: [Pharo-project] aligning morphs
>>>>
>>>>
>>>> Hi Gary,
>>>>
>>>> Thanks for the reply.
>>>>
>>>> So, what would be required for scrollbars to work with spaceFill? I
>>>> would really need this feature, but I do not know how to go about it.
>>>>
>>>> Could you or anyone else provide some hints? Of course code would be
>>>> even better. But at this moment hi ts would be helpful, too :)
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>>
>>>> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]>
>>>> wrote:
>>>>
>>>>> Hi Doru,
>>>>>
>>>>> #spaceFill constraints are typically only used by table layouts.
>>>>> ScrollPane is designed for fixed size contents, at present.
>>>>> Might be nice to extend it to honour any #spaceFill of its single
>>>>> target morph.
>>>>> This would simplify usage of scrollers quite a bit!
>>>>>
>>>>> Regards, Gary
>>>>>
>>>>> ----- Original Message ----- From: "Tudor Girba"
>>>>> <[hidden email]>
>>>>> To: "[hidden email] Development"
>>>>> <[hidden email]>
>>>>> Sent: Saturday, January 08, 2011 1:22 AM
>>>>> Subject: [Pharo-project] aligning morphs
>>>>>
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> I would need help with understanding the magic behind alignment in
>>>>> Morphic.
>>>>>
>>>>> Take the example from below. Could anyone help me with what I should
>>>>> do to have the morph stretch all the way horizontally?
>>>>>
>>>>> | scroll window morph |
>>>>> scroll := ScrollPane new.
>>>>> scroll
>>>>> fillStyle: (SolidFillStyle color: Color blue);
>>>>> vResizing: #spaceFill;
>>>>> hResizing: #spaceFill.
>>>>> morph := PanelMorph new.
>>>>> morph
>>>>> fillStyle: (SolidFillStyle color: Color yellow);
>>>>> changeTableLayout;
>>>>> listDirection: #topToBottom;
>>>>> vResizing: #shrinkWrap;
>>>>> hResizing: #spaceFill;
>>>>> layoutInset: 10.
>>>>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>>>>> scroll scroller addMorph: morph.
>>>>> window := SystemWindow new.
>>>>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0
>>>>> corner: 1 @ 1)).
>>>>> window openInWorld
>>>>>
>>>>>
>>>>> Cheers,
>>>>> Doru
>>>>>
>>>>>
>>>>> --
>>>>> www.tudorgirba.com
>>>>>
>>>>> "Every thing should have the right to be different."
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Problem solving efficiency grows with the abstractness level of problem
>>> understanding."
>>>
>>>
>>>
>>> <GeneralScrollPaneLayout.1.cs>
>>
>> --
>> www.tudorgirba.com
>>
>> "Some battles are better lost than fought."
>>
>>
>>
>> <GeneralScrollPaneLayout.2.cs>
>
> --
> www.tudorgirba.com
>
> "In a world where everything is moving ever faster,
> one might have better chances to win by moving slower."
>
>
>
>
>

--
www.tudorgirba.com

"To lead is not to demand things, it is to make them happen."





Reply | Threaded
Open this post in threaded view
|

Re: aligning morphs

Tudor Girba
It's already integrated in Pharo :).

Cheers,
Doru


On 20 Jan 2011, at 12:03, Gary Chambers wrote:

> Not yet. (gmail issues) .Go ahead though if you wish.
>
> Regards, Gary
>
> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Sent: Tuesday, January 18, 2011 7:44 PM
> Subject: Re: [Pharo-project] aligning morphs
>
>
> Hi Gary,
>
> Did you publish the changes to GeneralScrollPane somewhere?
>
> Cheers,
> Doru
>
>
> On 17 Jan 2011, at 12:07, Gary Chambers wrote:
>
>> It seems you are asking for the scroll value before the layout has been calculated.
>> (since the window hasn't received a fullbounds yet).
>>
>>
>> | m scroll |
>> m := PanelMorph new.
>> m
>> hResizing: #shrinkWrap;
>> vResizing: #spaceFill;
>> changeTableLayout;
>> listDirection: #leftToRight.
>> m addMorphBack: (Morph new
>> minWidth: 100;
>> hResizing: #shrinkWrap;
>> vResizing: #spaceFill).
>> scroll := GeneralScrollPane new
>> changeScrollerTableLayout;
>> scrollTarget: m.
>> scroll openInWindow.
>> scroll hScrollbar setValue: 1.0.
>> m addMorphBack: (Morph new
>> minWidth: 100;
>> hResizing: #shrinkWrap;
>> vResizing: #spaceFill).
>>  "Recalculate bounds now for this example... not generally needed for normal code!"
>> scroll fullBounds.
>>  "****"
>> scroll hScrollbar value
>>
>> Is not normally an issue, as you can see from inspecting the scroller after being opened.
>>
>> Regards, Gary
>>
>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Sunday, January 16, 2011 10:56 AM
>> Subject: Re: [Pharo-project] aligning morphs
>>
>>
>> Hi Gary,
>>
>> I would like to implement a Finder-like behavior the GeneralScrollPane. For this, I would need a way to control the scrolling so that every time I add a new morph, the scroller scrolls (similar to ScrollBar>>animateValue:duration: from OB).
>>
>> The problem seems to be that the scrollbar value is not updated when I add a new morph. Take a look at the code below. The result of the horizontal scrollbar value at the end is 1.0, while it should be lower. Am I doing something wrong, or is this a problem?
>>
>> | m scroll |
>> m := PanelMorph new.
>> m
>> hResizing: #shrinkWrap;
>> vResizing: #spaceFill;
>> changeTableLayout;
>> listDirection: #leftToRight;
>> m addMorphBack: (Morph new
>> minWidth: 100;
>> hResizing: #shrinkWrap;
>> vResizing: #spaceFill).
>> scroll := GeneralScrollPane new
>> changeScrollerTableLayout;
>> scrollTarget: m.
>> scroll openInWindow.
>> scroll hScrollbar setValue: 1.0.
>> m addMorphBack: (Morph new
>> minWidth: 100;
>> hResizing: #shrinkWrap;
>> vResizing: #spaceFill).
>> scroll hScrollbar value
>>
>> ==> 1.0
>>
>> Cheers,
>> Doru
>>
>>
>>
>> On 11 Jan 2011, at 15:17, Gary Chambers wrote:
>>
>>> A slight revision as this has highlighted an edge case in the original class
>>> as to when scrollbars are needed...
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>> To: <[hidden email]>
>>> Sent: Tuesday, January 11, 2011 1:53 PM
>>> Subject: Re: [Pharo-project] aligning morphs
>>>
>>>
>>> Excellent!
>>>
>>> I tried the example and it works well. I will work with it in the following days.
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> On 11 Jan 2011, at 14:39, Gary Chambers wrote:
>>>
>>>> Try the attached change set with the following example...
>>>> Let me know if any use and we'll get it integrated.
>>>>
>>>> |m|
>>>> m := PanelMorph new.
>>>> m
>>>> fillStyle: Color green;
>>>> hResizing: #spaceFill;
>>>> vResizing: #spaceFill;
>>>> changeTableLayout;
>>>> layoutInset: 8.
>>>> m addMorph: (Morph new
>>>> height: 160;
>>>> minWidth: 100;
>>>> hResizing: #spaceFill;
>>>> vResizing: #shrinkWrap).
>>>> GeneralScrollPane new
>>>> changeScrollerTableLayout;
>>>> scrollTarget: m;
>>>> openInWindow
>>>>
>>>>
>>>> Regards, Gary
>>>>
>>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>>> To: <[hidden email]>
>>>> Sent: Monday, January 10, 2011 8:23 PM
>>>> Subject: Re: [Pharo-project] aligning morphs
>>>>
>>>>
>>>> Wow, that would be great! I cannot wait to test it.
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>>
>>>> On 10 Jan 2011, at 16:50, Gary Chambers wrote:
>>>>
>>>>> I may get time later in the week to have a go with GeneralScrollPane to support the feature you desire... ;-)
>>>>>
>>>>> Regards, Gary
>>>>>
>>>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>>>> To: <[hidden email]>
>>>>> Cc: <[hidden email]>
>>>>> Sent: Monday, January 10, 2011 2:23 PM
>>>>> Subject: Re: [Pharo-project] aligning morphs
>>>>>
>>>>>
>>>>> Hi Gary,
>>>>>
>>>>> Thanks for the reply.
>>>>>
>>>>> So, what would be required for scrollbars to work with spaceFill? I would really need this feature, but I do not know how to go about it.
>>>>>
>>>>> Could you or anyone else provide some hints? Of course code would be even better. But at this moment hi ts would be helpful, too :)
>>>>>
>>>>> Cheers,
>>>>> Doru
>>>>>
>>>>>
>>>>>
>>>>> On Jan 10, 2011, at 13:04, "Gary Chambers" <[hidden email]> wrote:
>>>>>
>>>>>> Hi Doru,
>>>>>>
>>>>>> #spaceFill constraints are typically only used by table layouts.
>>>>>> ScrollPane is designed for fixed size contents, at present.
>>>>>> Might be nice to extend it to honour any #spaceFill of its single target morph.
>>>>>> This would simplify usage of scrollers quite a bit!
>>>>>>
>>>>>> Regards, Gary
>>>>>>
>>>>>> ----- Original Message ----- From: "Tudor Girba" <[hidden email]>
>>>>>> To: "[hidden email] Development" <[hidden email]>
>>>>>> Sent: Saturday, January 08, 2011 1:22 AM
>>>>>> Subject: [Pharo-project] aligning morphs
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I would need help with understanding the magic behind alignment in Morphic.
>>>>>>
>>>>>> Take the example from below. Could anyone help me with what I should do to have the morph stretch all the way horizontally?
>>>>>>
>>>>>> | scroll window morph |
>>>>>> scroll := ScrollPane new.
>>>>>> scroll
>>>>>> fillStyle: (SolidFillStyle color: Color blue);
>>>>>> vResizing: #spaceFill;
>>>>>> hResizing: #spaceFill.
>>>>>> morph := PanelMorph new.
>>>>>> morph
>>>>>> fillStyle: (SolidFillStyle color: Color yellow);
>>>>>> changeTableLayout;
>>>>>> listDirection: #topToBottom;
>>>>>> vResizing: #shrinkWrap;
>>>>>> hResizing: #spaceFill;
>>>>>> layoutInset: 10.
>>>>>> morph addMorphBack: (SimpleButtonMorph new width: 200; height: 200).
>>>>>> scroll scroller addMorph: morph.
>>>>>> window := SystemWindow new.
>>>>>> window addMorph: scroll fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
>>>>>> window openInWorld
>>>>>>
>>>>>>
>>>>>> Cheers,
>>>>>> Doru
>>>>>>
>>>>>>
>>>>>> --
>>>>>> www.tudorgirba.com
>>>>>>
>>>>>> "Every thing should have the right to be different."
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>>
>>>> "Problem solving efficiency grows with the abstractness level of problem understanding."
>>>>
>>>>
>>>>
>>>> <GeneralScrollPaneLayout.1.cs>
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Some battles are better lost than fought."
>>>
>>>
>>>
>>> <GeneralScrollPaneLayout.2.cs>
>>
>> --
>> www.tudorgirba.com
>>
>> "In a world where everything is moving ever faster,
>> one might have better chances to win by moving slower."
>>
>>
>>
>>
>>
>
> --
> www.tudorgirba.com
>
> "To lead is not to demand things, it is to make them happen."
>
>
>
>
>

--
www.tudorgirba.com

"Some battles are better lost than fought."