Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Skin Framework
  New Posts New Posts RSS Feed - Skinned listbox
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skinned listbox

 Post Reply Post Reply
Author
Message
rdmeyers View Drop Down
Groupie
Groupie


Joined: 11 December 2008
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdmeyers Quote  Post ReplyReply Direct Link To This Post Topic: Skinned listbox
    Posted: 06 January 2009 at 11:50am
I have a listbox that gets populated with 10,000+ items.  This typically takes only 1 second, but if the application is skinned it takes 8 seconds!  Why should skinning the app effect the performance of seemingly unrelated tasks?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 January 2009 at 2:58pm
Hi,
 
Guess ListBox redraw Scrollbar on each change.
 
Just add
 m_wndListBox.SetRedraw(FALSE);
 m_wndListBox.SetRedraw(TRUE);
 
around populating and you will get same 1sec.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
rdmeyers View Drop Down
Groupie
Groupie


Joined: 11 December 2008
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdmeyers Quote  Post ReplyReply Direct Link To This Post Posted: 07 January 2009 at 3:49pm
I was referring to a standard VB6 listbox control, so your code sample won't work.
 
Neither hiding the Listbox control, nor calling LockWindowUpdate on it improves the poor performance.
 
However, I did find a workaround that appears to solve the problem:
        SkinFramework1.RemoveWindow Listbox1.hWnd
        ' fill listbox code goes here
        SkinFramework1.ApplyWindow Listbox1.hWnd
Do you see any potential problem or side effect with this approach?
 
Back to Top
TomCollins88 View Drop Down
Newbie
Newbie
Avatar

Joined: 05 February 2009
Location: United States
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote TomCollins88 Quote  Post ReplyReply Direct Link To This Post Posted: 08 February 2009 at 9:22am
Have you tried turning off the autoredraw for the form?

me.AutoRedraw = False
'load listbox
me.AutoRedraw = True

Haven't had a chance to try it, but I think it'll work.
Back to Top
rdmeyers View Drop Down
Groupie
Groupie


Joined: 11 December 2008
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdmeyers Quote  Post ReplyReply Direct Link To This Post Posted: 25 June 2019 at 12:33pm
Well it has been 10 years and in an attempt to use the SkinFramework again I have found that this performance problem still exists!  How can I prevent the ListBox control from drawing the scrollbar after each item is added to it?  I have the control's Visible property set to False, and the Form's AutoRedraw property set to False.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.