On 23.01.2011 15:51, joe biggins wrote:
Hi,

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
finctionality)

Many thanks

Hi Joe.

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 tree.

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 .

HTH
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to