Missed Message when Listbox gets Scroll Bar


#1

Hello,

First, I'd like to say JUCE is pretty awesome.  Thanks for all yr hardwork Jules.  I've played  around with it a few times here and there, but over the last two or so months, I've been getting into it pretty heavily. 

I have come accross a problem, and I'm pretty sure it's my problem, here it is:

 

I have a Component(That's part of a multidocumentwindow).  Inside this component lives a list box.

The component class has a call back that gets called when it needs to update the list.  All good..

It start's without having a scroll bar,  Once there are more messages than vertical space, A scrollbar is automatically added. awesome.

 

However, I am having this problem.  Once i get to the point where it needs to add a scroll bar, the list box doesn't appear to update.  So I am always 1 message behind when items are added to the list box after it get's a scroll bar. 

 

Is there something I need to be doing to handle when a scroll bar is added, and call updateContent() ? 

 

Thanks !  

 

Bryan O 

 


#2

Oh, I think i figured it out...

the guess my list box shouldn't be the same size as my component window.. The message was there, it was just hidden:

 

Old:

    eventList.setSize(getWidth(),getHeight());

New:

    eventList.setSize(getWidth(),getHeight() - 20);

===

What I do still find weird, is when I exit the application, I get a malloc error trying to free an unallocated pointer..  (It's coming from the object that's added to the listbox).. 

This only happens once I get to having a vertical scroll bar.   If i exit my application before it has a scroll bar, I never get this error..

hmm..