Author Topic: [SOLVED] How to clear strings from wxListBox  (Read 8738 times)

Landslyde

  • Guest
[SOLVED] How to clear strings from wxListBox
« on: August 05, 2018, 10:26:17 pm »
Does anyone know how to clear strings out of a wxListBox? I found this, but it doesn't help me.

This ListBox holds names. As data's entered and saved to the db, I want to be able to refresh the ListBox. Easiest way for me is to clear it out and refill it. There may be easier ways to do this, but I don't know my way around C++ very well. So if you know how to clear out a ListBox, this will be a big help to me. Thanks.

** UPDATE **
Although Clear() isn't listed for me when I Ctrl + Spacebar, I manually put it in (expecting an error to be thrown) and it worked. I can't help but wonder why Clear() doesn't show next to ListBox1-> when I use Ctrl + Spacebar. Crazy, that!
« Last Edit: August 06, 2018, 08:08:28 am by Landslyde »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: [SOLVED] How to clear strings from wxListBox
« Reply #1 on: August 10, 2018, 01:52:43 pm »
Quote
Although Clear() isn't listed for me when I Ctrl + Spacebar, I manually put it in (expecting an error to be thrown) and it worked. I can't help but wonder why Clear() doesn't show next to ListBox1-> when I use Ctrl + Spacebar. Crazy, that!
Don't use code completion for code reference or documentation... Function names do not describe always what a function does... Read the documentation of the code to be sure. Our cc parser is not the best with templates and the new wxWidgets uses template code for containers so this is probably the reason why the completion does not work for container functions...