From abb2971654f62f7a9861a6aa5ef95a4916465183 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 2 Aug 2024 21:15:02 +0200 Subject: Fix Fl_Tabs callback in Overflow mode (#1031). --- test/tabs.fl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/tabs.fl b/test/tabs.fl index 25a610b9d..78c9b9da8 100644 --- a/test/tabs.fl +++ b/test/tabs.fl @@ -12,7 +12,13 @@ Function {} {open label {class Fl_Tabs} xywh {95 0 130 35} labeltype ENGRAVED_LABEL labelfont 1 } - Fl_Tabs tabs_group {open + Fl_Tabs tabs_group { + callback {Fl_Widget *sel_tab = o->value(); +if (sel_tab) { + printf("Callback called for tab \\"%s\\"\\n", sel_tab->label()); +} else { + printf("Callback called\\n"); +}} open selected tooltip {the various index cards test different aspects of the Fl_Tabs widget} xywh {10 35 315 260} selection_color 4 labelcolor 7 resizable code0 {// tabs_group->handle_overflow(Fl_Tabs::OVERFLOW_PULLDOWN);} } { @@ -159,7 +165,7 @@ Function {} {open } } Fl_Group {} { - label tab2 selected + label tab2 tooltip {tab2 tests among other things the cooperation of modal windows and tabs} xywh {330 60 320 235} selection_color 2 } { Fl_Button {} { -- cgit v1.2.3