comparison os2/dw.c @ 1398:152e3c8916de

Set tooltip on the entryfield part of a combobox... Otherwise the tooltip will float at the bottom of the expanded combobox's area.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 27 Nov 2011 11:19:42 +0000
parents 2ccf7eacedf5
children ccd383e11ff8
comparison
equal deleted inserted replaced
1397:2ccf7eacedf5 1398:152e3c8916de
6389 * handle: Handle to the window (widget). 6389 * handle: Handle to the window (widget).
6390 * bubbletext: The text in the floating bubble tooltip. 6390 * bubbletext: The text in the floating bubble tooltip.
6391 */ 6391 */
6392 void API dw_window_set_tooltip(HWND handle, char *bubbletext) 6392 void API dw_window_set_tooltip(HWND handle, char *bubbletext)
6393 { 6393 {
6394 WindowData *blah = (WindowData *)WinQueryWindowPtr(handle, QWP_USER); 6394 HWND buddy = (HWND)dw_window_get_data(handle, "_dw_comboentry");
6395 HWND buddy = (HWND)dw_window_get_data(handle, "_dw_buddy"); 6395 WindowData *blah = (WindowData *)WinQueryWindowPtr(buddy ? buddy : handle, QWP_USER);
6396
6397 buddy = (HWND)dw_window_get_data(handle, "_dw_buddy");
6396 6398
6397 if(blah) 6399 if(blah)
6398 strncpy(blah->bubbletext, bubbletext, BUBBLE_HELP_MAX - 1); 6400 strncpy(blah->bubbletext, bubbletext, BUBBLE_HELP_MAX - 1);
6399 if(buddy && (blah = (WindowData *)WinQueryWindowPtr(buddy, QWP_USER))) 6401 if(buddy && (blah = (WindowData *)WinQueryWindowPtr(buddy, QWP_USER)))
6400 strncpy(blah->bubbletext, bubbletext, BUBBLE_HELP_MAX - 1); 6402 strncpy(blah->bubbletext, bubbletext, BUBBLE_HELP_MAX - 1);