1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

Add TextBox::onReturnPressed.

This commit is contained in:
Andreas Kling 2018-10-13 23:19:44 +02:00
parent 7a0a7abc52
commit d305c316e1
5 changed files with 14 additions and 1 deletions

View file

@ -83,6 +83,10 @@ int main(int argc, char** argv)
tb->setText("Hello!");
tb->setFocus(true);
tb->onReturnPressed = [] (TextBox& textBox) {
printf("TextBox %p return pressed: '%s'\n", &textBox, textBox.text().characters());
};
WindowManager::the().setActiveWindow(widgetTestWindow);
}