|
|||||||
| TX Text Control .NET Please use this forum for TX Text Control .NET support only. If you need support for a different product, please use the appropriate forum. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
|||
|
|||
|
The TxTextControl object must have been completely loaded to use this method
I have a txTextControl whose load method is being called when a tab on my form is being activated. Sounds simple and it should be except for this error i get when i try to call the load method :
'The TxTextControl object must have been completely loaded to use this method' Great...So does anyone know how to completely load the control or am i screwed???? Cheers |
|
#2
|
||||
|
||||
|
Hi Alan,
What are you doing in the Load event? We do not recommend to let TX Text Control do anything while loading as it initializes itself. You can use the Changed event instead: After it has been fired 3 times, TX Text Control is ready and fully initialized.
__________________
Regards, Gunnar Giffey, TX Text Control [Forum Administrator] |
|
#3
|
|||
|
|||
|
Hi
thanks for the response. used the changed event to make sure its loaded and everything works fine now. How come the control isn't initialised when the form is initialised??? |
|
#4
|
|||
|
|||
|
Because you're form isn't initilised yet and because events in VB.Net have the tendancy to fire before the Load method. Don't really understand why...
So if u have code in an event, let's say TabChanged, and u try to do a txtControl.Load, the txtControl isn't initialised yet & CRASH... Correct me if i'm wrong here, pls, not really sure of the above... |
|
#5
|
||||
|
||||
|
Jay is correct. The TX Text Control must be completely initialized, before using any methods. We recommend not to use the FormLoad event. It would be better to wait and then using the Changed Event.
__________________
Regards, Christopher Krause, TX Text Control |
|
#6
|
|||
|
|||
|
Re: The TxTextControl object must have been completely loaded to use this method
I was having this same problem and I got around it another way.
I have a tab control and on one of the tabs is a text control and when the tab is clicked a TreeView is built with nodes and dependant on the node clicked the text control is loaded. I was getting this same error message even if the form loaded, the tab was selected and other nodes were clicked which did not load the text control and I waited five mins and then clicked on a node that did load the text control and Crash. I tracked it down to the .Visible property. Silly really but the text control is set to "visible = false" until the control is loaded and then set to "visible=true". This would cause the first load to fail everytime but subsequent loads worked fine. All I did was to add a "Visible=true" and immediately after a "Visible=false" then continued with everything the same and BINGO it works a treat. I suspect this is an error with the control as you should be able to load a fully initialised control when not visible. Try it and you will see it what I mean. Anyway temporary fix put in and all working like a dream now. Hope this helps |
|
#7
|
|||
|
|||
|
Re: The TxTextControl object must have been completely loaded to use this method
Hi,
not sure if this will help others running in to similiar issue. I called the load function in shown event of windows.form and it worked just fine. --ravi |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The TXTextControl object must have been completely loaded to use this method | samsmithnz | TX Text Control .NET | 12 | November 6, 2009 17:08:56 |
| The TxtextControl object must have been completely loaded to use this method. | anemvr | TX Text Control .NET | 3 | May 13, 2005 14:39:00 |
| TXTextControl object must have been completely loaded | cheemk | TX Text Control .NET | 7 | October 23, 2003 20:15:15 |