SimpleButtonMorph questions

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

SimpleButtonMorph questions

pop.mail.yahoo.com
I would like to change the label color of SimpleButtonMorphs.
 
Also, I have a series of these buttons, and would like them to be the same length with the label centered.
 
Any help would be appreciated.

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: SimpleButtonMorph questions

Herbert König
Hi Jack,

welcome here!

pmyc> I would like to change the label color of SimpleButtonMorphs.

With World Menu, new Morph, from alphabetical list
I put one on the screen, with the grey halo I opened an Inspector on
it.

In that I typed:
(self findA: StringMorph) color: Color red
used "doIt" and got a red label.

I got the idea from the label: method in SimpleButtonMorph.

pmyc>  
pmyc> Also, I have a series of these buttons, and would like
pmyc> them to be the same length with the label centered.

In that same inspector typing in:
self width: 80
and doIt it changed its width.

Having the label centered is is second nature to this Morph also can
be seen in the method label:

As you can see there setting the label also sets the extents so send
width: aNumber or extent: aPoint late in the process.

Hth,

Herbert  

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners