Mercurial > dwindows
comparison mac/dw.m @ 1400:ccd383e11ff8
Allow removing of tooltips by passing NULL or "" and prevent double tooltips on some platforms.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 27 Nov 2011 20:28:15 +0000 |
parents | 117cc38a3799 |
children | c607fd86e5c2 |
comparison
equal
deleted
inserted
replaced
1399:8e569dd09d94 | 1400:ccd383e11ff8 |
---|---|
8170 * bubbletext: The text in the floating bubble tooltip. | 8170 * bubbletext: The text in the floating bubble tooltip. |
8171 */ | 8171 */ |
8172 void API dw_window_set_tooltip(HWND handle, char *bubbletext) | 8172 void API dw_window_set_tooltip(HWND handle, char *bubbletext) |
8173 { | 8173 { |
8174 id object = handle; | 8174 id object = handle; |
8175 [object setToolTip:[NSString stringWithUTF8String:bubbletext]]; | 8175 if(bubbletext && *bubbletext) |
8176 [object setToolTip:[NSString stringWithUTF8String:bubbletext]]; | |
8177 else | |
8178 [object setToolTip:nil]; | |
8176 } | 8179 } |
8177 | 8180 |
8178 /* | 8181 /* |
8179 * Disables given window (widget). | 8182 * Disables given window (widget). |
8180 * Parameters: | 8183 * Parameters: |