From 549ef06358e4d31553640be9ec6f2df4a29a9d95 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 29 Nov 2006 09:46:43 +0000 Subject: STR #1467: explained tooltip inheritance - and how to avoid it). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5552 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 1 + documentation/Fl_Widget.html | 5 +++++ test/tabs.fl | 7 ++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 1ae85e6fb..6e5846149 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ CHANGES IN FLTK 1.1.8 + - Documented tooltip inheritance (STR #1467) - Better event mouse handling fixing detached menus and sticky tooltips (STR #1463, STR #449) - Documentation fixes (STR #1454, STR #1455, STR #1456, diff --git a/documentation/Fl_Widget.html b/documentation/Fl_Widget.html index dfc26277f..be07ae2f9 100644 --- a/documentation/Fl_Widget.html +++ b/documentation/Fl_Widget.html @@ -470,6 +470,11 @@ window when the user hovers the mouse over the widget. The string is not copied, so make sure any formatted string is stored in a static, global, or allocated buffer. +

If no tooltip is set, the tooltip of the parent is inherited. +Setting a tooltip for a group and setting no tooltip for a child +will show the group's tooltip instead. To avoid this behavior, +you can set the child's tooltip to an empty string +("").

uchar Fl_Widget::type() const;

diff --git a/test/tabs.fl b/test/tabs.fl index 0081bd977..c660a2164 100644 --- a/test/tabs.fl +++ b/test/tabs.fl @@ -11,19 +11,20 @@ Function {} {open tooltip {the various index cards test different aspects of the Fl_Tabs widget} xywh {10 10 300 200} selection_color 4 labelcolor 7 resizable } { Fl_Group {} { - label Label1 open selected + label Label1 open tooltip {this Tab tests correct keyboard navigation between text input fields} xywh {10 30 300 180} selection_color 1 resizable } { Fl_Input {} { label {input:} - xywh {60 50 240 40} + tooltip {This is the first input field} xywh {60 50 240 40} } Fl_Input {} { label {input2:} xywh {60 90 240 30} + code0 {o->tooltip("");} } Fl_Input {} { - label {input3:} + label {input3:} selected xywh {60 120 240 80} } } -- cgit v1.2.3