mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-06 17:12:50 +00:00
Added tooltip support
This commit is contained in:
1 parent
a1e3feda4f
commit
55fa6024db
1 file changed
+26
@@ -100,6 +100,8 @@ var CPControlBlackColor = [CPColor blackColor];
|
||||
CPCellImagePosition _imagePosition;
|
||||
CPImageScaling _imageScaling;
|
||||
|
||||
CPString _toolTip;
|
||||
|
||||
// Target-Action Support
|
||||
id _target;
|
||||
SEL _action;
|
||||
@@ -314,6 +316,30 @@ var CPControlBlackColor = [CPColor blackColor];
|
||||
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
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user