Today on the the first part :-) I give you THE TEXT BUTTON
// ToolTip does not work currently on Windows...
TextButton * button = new TextButton( T("Button"), Colours::lavender, Colours::teal, Colours::springgreen, T("tooltip") );
if( button )
{
// We only care about the height, as we call "fit text" for the width
button->setSize (100, 28);
button->changeWidthToFitText();
button->setTopLeftPosition(10,360);
// We need to add an Actionistener
// We can simply inherit this class from ActionListener
// and overwrite the actionListenerCallback()
button->addActionListener (this);
addAndMakeVisible( button ); // Voila, done!
}
No comments:
Post a Comment