talwyn has asked for the wisdom of the Perl Monks concerning the following question:

When the number of items inserted into the list exeeds its current displayable size my list box disappears...

That is it vanishes and does not redraw itself... I have placed both

within the code inserting information into the listview.

However, that does not appear to make a difference. Is there an option I should make sure is enabled in the Listview when it is built or another method incharge of ensuring that the window is re-drawn?

I have observed the following:

Any help or pointers would be appreciated. I did not include any code since I felt that this was something simple I am overlooking since I am not very familiar with how the Win32-Gui module works yet.

  • Comment on Win32::GUI -- Listview Display Problems

Replies are listed 'Best First'.
Re: Win32::GUI -- Listview Display Problems
by Courage (Parson) on Jul 03, 2002 at 09:06 UTC
    Is it a requirement to use Win32::GUI?

    If you really stuck with it, I can see into this later at evening after work, but please give me a smallest working piece of code that show us a problem.

    Now, I just share my experience with similar things

    - first, most obvious, use perlTk.

    - second, use some known GUI framework such as C++builder and call perl functions from within it. I did so earlier and that was not bad: I managed variables to be "tied" directly into GUI screen, and changing of a perl variable changed a windowed control, and vice versa.

    Courage, the Cowardly Dog

      Courage:

      Using your header/Footer from the other day I constructed a Win32::Gui to reconstruct the problem.

      I couldn't duplicate the problem. So then I created another Guiloft version to see if the problem resided in that module. Again I couldn't duplicate the problem.

      Next I wrote a wrapper around my original guiloft window, still couldn't reproduce the problem.

      So finally I went through my code and noticed that I had neglected to duplicate the $listview->Update() method to my tests... After I commented out all occurences of $listview->Update()in my program the listview behaves properly.

      I hope dada documents the proper use of Update() in his next Beta cycle ... I was confused especially since I was using finddata.pl as an example of the various things gui does. It makes use of Update() several times.

      Thanks again for your help.

      Talwyn

        I faced similar problems several years ago when did such type of programming, and that is why I suggested you to try perl/Tk and may be other GUI/C++ framework and perl embed into it. Beleive me, the deeper you go into Win32::GUI the more problem you will get!

        At least you should not develop *serious* application with this module.
        Otherwise something bad is going to happen! (okay, I'm joking)

        Best wishes,
        Courage, the Cowardly Dog.

        Would one of you please post working code, so that others following this thread can see what needed to be done? Thanks.