summaryrefslogtreecommitdiff
path: root/components/rtgui/widgets/textbox.c
diff options
context:
space:
mode:
author[email protected] <[email protected]>2010-09-09 23:07:22 +0000
committer[email protected] <[email protected]>2010-09-09 23:07:22 +0000
commit3c975d6922c5bd451c67f82a010786c979d20fac (patch)
tree04be38f3aeec65e5dae96daca04b8b57162c3324 /components/rtgui/widgets/textbox.c
parent814ac8fb22784e9eea0cf0d5528276450c85e868 (diff)
fix widget hide/enable issue and add on_changed in slider widget.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@899 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui/widgets/textbox.c')
-rw-r--r--components/rtgui/widgets/textbox.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/rtgui/widgets/textbox.c b/components/rtgui/widgets/textbox.c
index b8a1096200..6a7ca0e7a2 100644
--- a/components/rtgui/widgets/textbox.c
+++ b/components/rtgui/widgets/textbox.c
@@ -273,6 +273,8 @@ rt_bool_t rtgui_textbox_event_handler(struct rtgui_widget* widget, struct rtgui_
break;
case RTGUI_EVENT_MOUSE_BUTTON:
+ if (!RTGUI_WIDGET_IS_ENABLE(widget) || RTGUI_WIDGET_IS_HIDE(widget)) return RT_FALSE;
+
#ifndef RTGUI_USING_SMALL_SIZE
if (widget->on_mouseclick != RT_NULL) widget->on_mouseclick(widget, event);
else
@@ -281,6 +283,8 @@ rt_bool_t rtgui_textbox_event_handler(struct rtgui_widget* widget, struct rtgui_
return RT_TRUE;
case RTGUI_EVENT_KBD:
+ if (!RTGUI_WIDGET_IS_ENABLE(widget) || RTGUI_WIDGET_IS_HIDE(widget)) return RT_FALSE;
+
#ifndef RTGUI_USING_SMALL_SIZE
if (widget->on_key != RT_NULL) widget->on_key(widget, event);
else