I want to add StreamWriter capacity to the AddOnFramework sample, but I am having trouble understanding what is a tab's equivalent event when it is first created.
I've read about Window creation events, but I have not found any for a tab creation event.
From my understanding, when writing an indicator, I can initialize objects like StreamWriter during the State change "DataLoaded"
Intellisense suggests State.Terminated, but I don't see a state.Created etc
It seems a Tab has a Cleanup() event ...
I've also read about TabControl() but that does not seem the place...
unless tc.Inititalized() can be used ?
Finally, I have tried
public AddOnFrameworkTab() // method inside class of same name { // .... StWr = new StreamWriter(StWrFilePath, false);
and Cleanup() is where I can dispose StWr
if (StWr != null) { StWr.Close(); StWr.Dispose(); StWr = null; }
Next Question, when I have multiple Tabs in a window, and I want to get an id for each, is there a collection in the Window manager that can tell me how many tabs there are?
Also, when I tried to use the property TabName, or this.GetHashCode() from inside AddOnFrameworkTab, it errored with Obj ref not instance...
so it appaers I need to wait for an event to complete which indicates that the tab has been created, and then I can get access to it's properties?
so I would need to understand what event I can override to gain access to those?
Thanks...
Comment