Stratalistview and ApplicationThreadManager


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Well, the message pump may not have completed before the scroll bars are fully initialized.  I have seen stuff like this before on different machines when there is, as you are dealing with, a threading issue.  Generally, I will move the loading logic to a thread safe location after all initialization logic has taken place on the core controls.

A semi-no-so-clean way to test this is to create a timer and drop it on the form and set it to something like 2-3 seconds.  Let this trigger your logic and see if the problem persists.  If not, then you know that the controls were not fully initialized and that a threaded conflict occurred.  In this case, you can just move the loading logic further downstream until you resolve it.  For example, override the OnLoad event of the form, call the base logic, then call your logic.  If that doesn't work, move to the OnShown, etc.
Marcel Heitlager
Marcel Heitlager
StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)StrataFrame User (202 reputation)
Group: StrataFrame Users
Posts: 84, Visits: 835
This issue only seems to come up on Windows server 2003, not on windows 7.

I have an ApplicationThreadManager on the main mdi form.  On a child form I have a stratalistview in a themedSplitContainer.Panel.  When I fill the the listview using  a separate thread, the scrollbars dissapear.

If you put a msgbox at the end of the fill method of that listview on that separate thread, the scrollbar is there.  When you click ok, and the thread has completed, the scrollbar disappears.  Anyone else observe this phenomenon?

I worked around this issue by only retrieving the data from a separate thread.  But still wondered why this might happen.

Thanks,

Marcel
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search