We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#include <LCUI.h> #include <LCUI/gui/widget.h> #include <LCUI/gui/widget/textview.h> #include <LCUI/gui/widget/textedit.h> #include <LCUI/gui/widget/button.h> void OnButtonClick(LCUI_Widget self, LCUI_WidgetEvent e, void *arg) { wchar_t str[256] = { 0 }; LCUI_Widget text = ((LCUI_Widget*)e->data)[0]; LCUI_Widget input = ((LCUI_Widget*)e->data)[1]; TextEdit_GetTextW(input, 0, 255, str); TextView_SetText(text, str); } int main(void) { LCUI_Widget root; LCUI_Widget text; LCUI_Widget button; LCUI_Widget input; LCUI_Widget button_data[2]; LCUI_Init(); root = LCUIWidget_GetRoot(); text = LCUIWidget_New("textview"); input = LCUIWidget_New("textedit"); button = LCUIWidget_New("button"); button_data[0] = text; button_data[1] = input; TextView_SetTextW(text, L"Hello, World!"); TextEdit_SetPlaceholderW(input, L"Please input..."); Button_SetTextW(button, "Change"); Widget_BindEvent(button, "click", OnButtonClick, button_data, NULL); Widget_Append(root, text); Widget_Append(root, input); Widget_Append(root, button); return LCUI_Main(); }
比如这个TextView_SetText 应该为 TextView_SetTextW
还有 Button_SetTextW(button, "Change") 应该为Button_SetTextW(button, L"Change")
新手看了例子更加一头雾水
The text was updated successfully, but these errors were encountered:
你是说文档里的例子?有部分示例代码是直接写文档里的,没时间建项目一个个测试。
Sorry, something went wrong.
No branches or pull requests
比如这个TextView_SetText 应该为 TextView_SetTextW
还有 Button_SetTextW(button, "Change") 应该为Button_SetTextW(button, L"Change")
新手看了例子更加一头雾水
The text was updated successfully, but these errors were encountered: