[Newbies] Button Wow Factor
mirkok.lists at googlemail.com
Mon Jan 24 15:12:48 UTC 2011
On 23.01.2011 15:51, joe biggins wrote:
> Ive been writing a program using simpleButtonMorphs, now everything is
> working I am trying to tweek the look and feel. How do I get the same
> buttons as appear in the squeak dialogue boxes (the ones with the two
> shades of gray that change colour when you roll over them, instread of
> the plain old boring simpleButtomMorph? Can these other buttons be
> subtyped? (I have been subtyping the simpleButton to give me an extra
> Many thanks
If you middle-click (or whatever it is on your system) on a GUI
element you get the "Halo" with the name of the selected element
written at the bottom of the Halo. This always starts with the
top-level widget (the window for example) but if repeat the
middle-click over a button for example, you descend down the widget
So if you repeatedly middle-click on a button in a dialog box,
you'll will eventually get the Halo for that button where you can
see what Morph this is and use the Halo buttons to inspect, explore,
... the Morph.
You can then see that it is a PluggableButtonMorphPlus which you can
use like this:
button := PluggableButtonMorphPlus new .
button label: 'Hello World' .
button action: [ Transcript cr ; show: 'Hello World'] .
button openInWorld .
More information about the Beginners