- 论坛徽章:
- 0
|
文档里是这么说的:
Controls when callbacks are done. The following values are useful, the default value is FL_WHEN_RELEASE:
* 0: The callback is not done, but changed() is turned on.
* FL_WHEN_CHANGED: The callback is done each time the text is changed by the user.
* FL_WHEN_RELEASE: The callback will be done when this widget loses the focus, including when the window is unmapped. This is a useful value for text fields in a panel where doing the callback on every change is wasteful. However the callback will also happen if the mouse is moved out of the window, which means it should not do anything visible (like pop up an error message). You might do better setting this to zero, and scanning all the items for changed() when the OK button on a panel is pressed.
* FL_WHEN_ENTER_KEY: If the user types the Enter key, the entire text is selected, and the callback is done if the text has changed. Normally the Enter key will navigate to the next field (or insert a newline for a Fl_Mulitline_Input), this changes the behavior.
* FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED: The Enter key will do the callback even if the text has not changed. Useful for command fields.
但是我用得很迷惑.不太明白.当我用FL_WHEN_CHANGED ,不能输入中文.这让我很是郁闷.别的参数如 0 ,FL_WHEN_RELEASE 好想看不出来什么区别.
知道的回复一下.谢谢!! |
|