mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-02 03:58:33 +08:00
impromve edit
This commit is contained in:
parent
cbb6adc992
commit
19c8ce6a74
@ -2,6 +2,7 @@
|
||||
* 2019/02/04
|
||||
* 增加测试程序。
|
||||
* 更新资源。
|
||||
* edit处理属性value。
|
||||
|
||||
* 2019/02/03
|
||||
* 增加object\_notify\_changed。
|
||||
|
@ -72,7 +72,7 @@ BEGIN_C_DECLS
|
||||
* ```c
|
||||
* widget_on(slide_menu, EVT_VALUE_CHANGED, on_current_changed, slide_menu);
|
||||
* ```
|
||||
|
||||
|
||||
* 可按下面的方法关注当前按钮被点击的事件:
|
||||
*
|
||||
* ```c
|
||||
|
@ -826,6 +826,9 @@ ret_t edit_get_prop(widget_t* widget, const char* name, value_t* v) {
|
||||
} else if (tk_str_eq(name, WIDGET_PROP_TIPS)) {
|
||||
value_set_str(v, edit->tips);
|
||||
return RET_OK;
|
||||
} else if (tk_str_eq(name, WIDGET_PROP_VALUE)) {
|
||||
value_set_wstr(v, widget->text.str);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
return RET_NOT_FOUND;
|
||||
@ -914,6 +917,11 @@ ret_t edit_set_prop(widget_t* widget, const char* name, const value_t* v) {
|
||||
edit->offset_x = 0;
|
||||
edit_set_cursor_pos(widget, 0x0fffffff, 0x0fffffff);
|
||||
return RET_OK;
|
||||
} else if (tk_str_eq(name, WIDGET_PROP_VALUE)) {
|
||||
edit->offset_x = 0;
|
||||
edit_set_cursor_pos(widget, 0x0fffffff, 0x0fffffff);
|
||||
wstr_from_value(&(widget->text), v);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
edit_update_status(widget);
|
||||
|
Loading…
Reference in New Issue
Block a user