Listview items on parent form listview does not display

P

Paul Reedy

I have an application that has a form with a listview.
It has a function that I call to start the unit to sync with different
providers depending on the platform they are syncing against. Each provider
is it's own class. One class syncs against our existing webservices, and
the other directly to a tcp object living on a legacy desktop application.

Since both of these provider classes needed a reference to the listview on
the form, they had private members where I would set the form on the class
property so the child classes could access the listview on the form.

I recently started a new application, and decided to try letting these
classes inherit from the form with the display / logging functions so they
could just call the base class functions to display status.

All of the syncing works fine, but when the child classes call the base
class functions to add items to the listview to display the status, none of
the items are visible.

The parent form is an abstract class which the "provider1" and "provider2"
classes inherit from.

Is there something I have to do special in this child/parent relationship to
make sure the items are visible?
 
P

Paul Reedy

oops.. nevermind...

one class was calling listview.clear instead of listview.items.clear.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top