Refresh interface


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Refresh interface

  1. #1
    Kelvin Guest

    Refresh interface


    In my interface, there is a list box to show informatoin of opened file. After
    the interface is loaded. user can choose the file to open. Then a function,
    which can show all information of the file in the list box, is run automatically.
    However, the list box doesn't update and show the information. Do i need
    to add anything to refresh the interface?


  2. #2
    Kandi Venka Guest

    Re: Refresh interface

    That's an interesting one. It sounds like the listbox isn't being populated
    since the AddItem method should cause a repaint.

    The reason I know this is that the AddItem can cause the screen to flicker
    and the code to run slow if you add thousands of items. This is because it
    repaints after every update.

    It is actually faster and not even apparent to a user in most cases if you
    make the listbox invisible for the milliseconds that it is taking to
    populate it. After it's populated, you just make it visible.

    Have you stepped through the code and verified that the AddItem code is
    being executed?

    "Kelvin" <chu@stanley.com> wrote in message news:3add3f5b$1@news.devx.com...
    >
    > In my interface, there is a list box to show informatoin of opened file.

    After
    > the interface is loaded. user can choose the file to open. Then a

    function,
    > which can show all information of the file in the list box, is run

    automatically.
    > However, the list box doesn't update and show the information. Do i need
    > to add anything to refresh the interface?
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center