TButton

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

TButton

rogerther
Hello all.

I'm having some problems with the TButton class.

I'm using this code:

pyr := TSierpinski new.
        matNorm := TMaterial new.
        matNorm ambientColor: #(0.5 0.7 0.7 0.5).
        matNorm diffuseColor: #(0.5 0.7 0.7 0.5).
        pyr material: matNorm.
        pyr scale: 5.0.
        pyr depth: 3.
        pyr initBounds.
        spi := TButton new.
        spi initializeWithFrame: pyr.
        sp addChild: spi.

And the Tbutton don't appear.
But if I add this line:

spi enable.

It will add the TButton, but the button will disappear if no pointer is pointed
at it.

How can I make the button stay on the screen? Am I missing something?

Another question.

Does croquet have some dropdown button or something similar? Where can I find
information about it?

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: TButton

David A. Smith-3
You need to set the TButton>># persist: true.
I should probably switch the initial state to be that way, because even
I run into this. These are the same TButtons that are used by the
TWindows, which don't show up until you mouse over the window then fade
away.

David

[hidden email] wrote:

> Hello all.
>
> I'm having some problems with the TButton class.
>
> I'm using this code:
>
> pyr := TSierpinski new.
> matNorm := TMaterial new.
> matNorm ambientColor: #(0.5 0.7 0.7 0.5).
> matNorm diffuseColor: #(0.5 0.7 0.7 0.5).
> pyr material: matNorm.
> pyr scale: 5.0.
> pyr depth: 3.
> pyr initBounds.
> spi := TButton new.
> spi initializeWithFrame: pyr.
> sp addChild: spi.
>
> And the Tbutton don't appear.
> But if I add this line:
>
> spi enable.
>
> It will add the TButton, but the button will disappear if no pointer is pointed
> at it.
>
> How can I make the button stay on the screen? Am I missing something?
>
> Another question.
>
> Does croquet have some dropdown button or something similar? Where can I find
> information about it?
>
> Thanks in advance.
>
>