Vida Marcell Posted December 5, 2021 Share Posted December 5, 2021 Hi everyone, i'm having a problem, i want to create an Item in a listbox with the text inside "name" every time i hit the add button here you can see: auto nameL = CreateLabel("Neve:", 5, 55, 120, 60, partneredit); //Neve = his name auto name = CreateTextField(70, 50, 135, 25, partneredit); //---------------------------------------------------------- auto add = CreateButton(L"Hozzáadás", 5, 195, 200, 30, partneredit); //Hozzáadás = add //---------------------------------------------------------- else if (ev.source == add) { partners->AddItem(name->GetText()); } break; But this is'nt working, however It is working if i hit enter in the "name" textfield with this code, but i dont want to use it like this: else if (ev.source == name) { partners->AddItem(name->GetText()); } So what i want is, i enter text in the "name" textfield and push the "add" button and it creates an item in the listbox with the text in the "name" textfield. here is the UI: Quote Link to comment Share on other sites More sharing options...
Vida Marcell Posted December 5, 2021 Author Share Posted December 5, 2021 Okay i think i know whats going on Quote Link to comment Share on other sites More sharing options...
Vida Marcell Posted December 5, 2021 Author Share Posted December 5, 2021 Allright i messed it up, i had 2 ev.source == add in my code. Damn this coding is hard. sorry Josh for filling up your community page with the se useless questions! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.