|
-
March 31st, 2002, 07:11 AM
#1
Gui controls & Threads
Hi,
I want to add a large number of nodes to a tree-view, but such operation halts the app.
I've tried using a separate thread, but the framework won't allow it, because the thread I've created it's the one that holds the control's windows handle.
Is there a way to pass that handle?
10X
Inbal
-
March 31st, 2002, 01:51 PM
#2
Re: Gui controls & Threads
Take a look at the Control.Invoke method.
The world holds two classes of men -- intelligent men without religion, and religious men without intelligence. Abu'l-Ala-Al-Ma'arri (973-1057; Syrian poet)
-
April 1st, 2002, 02:47 AM
#3
Re: Gui controls & Threads
Hi,
I've tried it, but the result was the same. 'Invoke' calls my method on the main thread, which means that the app stucks all the same.
Help!!!
Inbal
-
April 10th, 2002, 09:54 AM
#4
Re: Gui controls & Threads
Just a suggestion...
1) Create a new thread
2) Create new treeview (just class reference, no visuals) inside that thread
3) Populate the thread inside the class
4) When done, pass the reference of thread's treeview to the application's treeview and run a refresh on application's treeview
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|