Jump to content


Photo
- - - - -

Progress Bar while a ListBox is loading data


2 replies to this topic

#1 Ivan Gomez

Ivan Gomez

    Member

  • Members
  • PipPip
  • 20 posts

Posted 03 May 2007 - 09:18 AM

Hello!!

In VIP, I fill a ListBox with the data sourced by a very big File. I would like to show a little window with a Progress bar while the load is processing. When the load is finished the first window close the progress bar window. Any idea???

Thank you in advance...

#2 deepghosh

deepghosh

    Member

  • Members
  • PipPip
  • 37 posts
  • Gender:Male

Posted 05 May 2007 - 05:32 AM

You can use PROIV Progressbar control which VIP uses while loading the listbox which is an ActiveX control.

From the file load code, you can set the progressbar.

You need to first get the recordcount by SELECT COUNT(*) type of command.

Hello!!

In VIP, I fill a ListBox with the data sourced by a very big File. I would like to show a little window with a Progress bar while the load is processing. When the load is finished the first window close the progress bar window. Any idea???

Thank you in advance...



#3 DARREN

DARREN

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 396 posts
  • Gender:Male
  • Location:Florida,USA

Posted 07 May 2007 - 10:56 PM

Hello!!

In VIP, I fill a ListBox with the data sourced by a very big File. I would like to show a little window with a Progress bar while the load is processing. When the load is finished the first window close the progress bar window. Any idea???

Thank you in advance...


I think that what you are trying to achieve is at the least very difficult and at the most impossible - that is - to display a window containing a progress bar whilst loading a list box. The main reason is that a selection cycle (that services a list box) is basically an update that buffers data that it then sends to the client. Calling a window to display a progress bar whilst this is loading would mean that the window would keep 'flashing' up and then closing. The other issue that you have is that once the data has been read by PROIV it still has to be sent to the client. This, depending on your network, can take as long as the file read(s) themselves.

It is possible to display and update a progress bar that is on the same format as the list box itself.

The bigger issue here I think is the volume of data that is being rendered in the list box. How usefull can it be if there is that much of it. It may be more advantageous to prompt the user for some data to filter the number of records in the list box. If you have a SQL database then this can be used in a SQL statement or if the primary file is ISAM then alternate indexes can be used. I think this would be a better approach.



Another option to show that there is activity is to use the "application.DisplayProgressTime" method. This is not the best but would at least show that there is something going on.
Things should be made as simple as possible, but not simpler



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users