Submorph centering

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

Submorph centering

Sean P. DeNigris
Administrator
labelMorph := Morph new.
       
"labelCenteringMorph := Morph new
        beTransparent;
        hResizing: #spaceFill;
        changeTableLayout;
        listDirection: #leftToRight;
        listCentering: #center;
        addMorph: labelMorph;
        yourself."

Morph new
        color: Color white;
        changeTableLayout;
        listCentering: #center;
" cellPositioning: #center;"
        extent: 500@500;
        addMorph: labelMorph;
        openInWorld.

How do I get labelMorph centered on the width of its parent without labelCenteringMorph?
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Submorph centering

Nicolai Hess
wrapCentering: #center;
instead of
cellPositioning:#center;

I don't understand anything of this Morphic Layout stuff.
This is just what have seen in MenuMorph code


Nicolai



2014/1/7 Sean P. DeNigris <[hidden email]>
labelMorph := Morph new.

"labelCenteringMorph := Morph new
        beTransparent;
        hResizing: #spaceFill;
        changeTableLayout;
        listDirection: #leftToRight;
        listCentering: #center;
        addMorph: labelMorph;
        yourself."

Morph new
        color: Color white;
        changeTableLayout;
        listCentering: #center;
"       cellPositioning: #center;"
        extent: 500@500;
        addMorph: labelMorph;
        openInWorld.

How do I get labelMorph centered on the width of its parent without
labelCenteringMorph?



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Submorph-centering-tp4734988.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Submorph centering

hilaire
In reply to this post by Sean P. DeNigris
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Submorph centering

Benjamin Van Ryseghem (Pharo)
Did you try something like

myMorph center: myParent center
?


Ben

On 11 Jan 2014, at 17:11, Hilaire Fernandes <[hidden email]> wrote:

Tips: to discover which message fit your need, you can experiment from
the menu you got from the halo of your morph.

Hilaire

Le 07/01/2014 19:16, Sean P. DeNigris a écrit :
labelMorph := Morph new.

"labelCenteringMorph := Morph new
beTransparent;
hResizing: #spaceFill;
changeTableLayout;
listDirection: #leftToRight;
listCentering: #center;
addMorph: labelMorph;
yourself."

Morph new
color: Color white;
changeTableLayout;
listCentering: #center;
" cellPositioning: #center;"
extent: 500@500;
addMorph: labelMorph;
openInWorld.

How do I get labelMorph centered on the width of its parent without
labelCenteringMorph?



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Submorph-centering-tp4734988.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.




--
Dr. Geo http://drgeo.eu