Jump to content

Getting the text from a listbox item.


Vida Marcell
 Share

Recommended Posts

Another day another question that i will solve 10 minutes after asking this. Hi everyone! im having a problem, i want to load an image from my disc that has the same name as one of the listbox item here is what im thinking about:

auto pixmap = LoadPixmap("the selected item from the listbox"->GetText());
                    if (pixmap)
                    {
                        profilepic->SetPixmap(pixmap, PIXMAP_CONTAIN);
                        loadimage->SetText(StripDir("the selected item from the listbox"->GetText()));
                    }

here is what i was thinking for solution:

auto pixmap = LoadPixmap(partners->Selection->GetText());
                    if (pixmap)
                    {
                        profilepic->SetPixmap(pixmap, PIXMAP_CONTAIN);
                        loadimage->SetText(StripDir(partners->Selection->GetText()));
                    }

summary: i have to get the text from the selected item in a listbox

Thanks a lot for the help!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...