Mercurial > dwindows
changeset 1399:8e569dd09d94
On Windows get the buddy from the child window data when creating a combobox.
Also set the tooltip on buddy controls for full coverage.
Fixes the tooltip only showing for the down arrow on comboboxes.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 27 Nov 2011 12:08:05 +0000 |
parents | 152e3c8916de |
children | ccd383e11ff8 |
files | win/dw.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/win/dw.c Sun Nov 27 11:19:42 2011 +0000 +++ b/win/dw.c Sun Nov 27 12:08:05 2011 +0000 @@ -5567,7 +5567,8 @@ cinfo2->back = cinfo->back = -1; cinfo2->combo = cinfo->combo = tmp; EnumChildWindows(tmp, _subclass_child, (LPARAM)cinfo2); - + cinfo->buddy = cinfo2->buddy; + SetWindowLongPtr(tmp, GWLP_USERDATA, (LONG_PTR)cinfo); dw_window_set_font(tmp, DefaultFont); SetWindowText(tmp, text); @@ -6201,6 +6202,10 @@ */ void API dw_window_set_tooltip(HWND handle, char *bubbletext) { + ColorInfo *cinfo = (ColorInfo *)GetWindowLongPtr(handle, GWLP_USERDATA); + + if(cinfo && cinfo->buddy) + _create_tooltip(cinfo->buddy, bubbletext); _create_tooltip(handle, bubbletext); }