PDA

View Full Version : Loading in Tabs


HaimK
January 27, 2003, 14:35:24
I have a form which contains a tab control. Each tab has a differant text control which loads xhtml data from a database. When the form is initially loaded one textcontrol is visible, and the others are hidden in the other tab pages. Trying to load the text into one of the hidden textcontrols (with the following code:
Textctl1.Load("<HTML><BODY>" & Dataset1.Tables(0).Rows(0)("myText") & "</BODY></HTML>", TXTextControl.StringStreamType.HTMLFormat) generates this exception:

The TXTextControl object must have been completely loaded to use this method.

If I click on each tab page prior to loading the data, then the control loads properly. Any suggestions how to work around this?

Haim

Vann Joe
January 27, 2003, 17:36:14
Is it great minds or dirty minds think alike?

We do the same thing, but we add the tab pages and the TX with Dock set to fill at run time. Thus we can have an unlimited number of documents open.

If you are doing it design time, then I think you need to initially have all the tabs visible, and then set 1 to capacity invisible in the initial Activated event. That should resolve things.