Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added tooltip support
  • Loading branch information
M ESCO authored and Ross Boucher committed Mar 5, 2009
1 parent a1e3fed commit 55fa602
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions AppKit/CPControl.j
Expand Up @@ -100,6 +100,8 @@ var CPControlBlackColor = [CPColor blackColor];
CPCellImagePosition _imagePosition; CPCellImagePosition _imagePosition;
CPImageScaling _imageScaling; CPImageScaling _imageScaling;


CPString _toolTip;

// Target-Action Support // Target-Action Support
id _target; id _target;
SEL _action; SEL _action;
Expand Down Expand Up @@ -314,6 +316,30 @@ var CPControlBlackColor = [CPColor blackColor];
return _textShadow; return _textShadow;
} }


/*!
Sets the tooltip for the receiver.
@param aToolTip the tooltip
*/
-(void)setToolTip:(CPString)aToolTip
{
if (_toolTip == aToolTip)
return;

_toolTip = aToolTip;

#if PLATFORM(DOM)
_DOMElement.title = [aToolTip cssString];
#endif
}

/*!
Returns the receiver's tooltip
*/
-(CPString)toolTip
{
return _toolTip;
}

/*! /*!
Returns the receiver's target action Returns the receiver's target action
*/ */
Expand Down

0 comments on commit 55fa602

Please sign in to comment.