summaryrefslogtreecommitdiff
path: root/src/Fl_Input_Choice.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-04-03 11:23:57 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-04-03 11:23:57 +0200
commit71caca84d92161792861fb33381f7a9c2be05343 (patch)
tree0a9bd0ef23ba4051af4070dba1afcf87111ec7b6 /src/Fl_Input_Choice.cxx
parent07bb343de7c6b4152a7eb8940da99d5d006f27cd (diff)
parent678c85027294c0ae5162d02b20a59fde758ac77a (diff)
Merge remote-tracking branch 'refs/remotes/origin/master'
Diffstat (limited to 'src/Fl_Input_Choice.cxx')
-rw-r--r--src/Fl_Input_Choice.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Fl_Input_Choice.cxx b/src/Fl_Input_Choice.cxx
index 77a7d937e..4183b3e65 100644
--- a/src/Fl_Input_Choice.cxx
+++ b/src/Fl_Input_Choice.cxx
@@ -54,6 +54,10 @@
- 1: the user picked a different item in the choice menu
- 0: the user typed or pasted directly into the input field
+ FLTK triggers an `FL_BEFORE_MENU` event for this widget right before
+ displaying the menu. This event provides an opportunity to update menu
+ item states and activation.
+
\par Example Use of Fl_Input_Choice
\code
#include <stdio.h>
@@ -152,6 +156,7 @@ void Fl_Input_Choice::InputMenuButton::draw() {
// Make pulldown menu appear under entire width of widget
const Fl_Menu_Item* Fl_Input_Choice::InputMenuButton::popup() {
+ handle(FL_BEFORE_MENU);
menu_end();
redraw();
Fl_Widget_Tracker mb(this);