Re: Maintain Information About Code created tabs by Brian
Brian
Sun Nov 13 22:05:28 CST 2005
Jeffery - This is kind of the path I am headed right now. I'll let you know
if I run into issues.
Thanks,
Brian
""Jeffrey Tan[MSFT]"" <v-jetan@online.microsoft.com> wrote in message
news:Z26AzrL6FHA.832@TK2MSFTNGXA02.phx.gbl...
> Hi Brian,
>
> Thanks for your post.
>
> In winform, there is no build-in support for this. This is actually a
> language issue. I think we can use an ArrayList or some other .Net
> collection data structures to store a number of HashTable references, each
> one for a TabPage, so that we can use the TabPage index as the index into
> the ArrayList to find corresponding HashTable. Then in the hashtable, you
> can use the Control.Name as the key to store all the controls' references
> on certain TabPage.
>
> We can define the top level ArrayList as a public property/field of form
> class, so that all the code in the form can access this ArrayList. Outside
> of the form, once we can access the Form reference, we still can access
> the
> public ArrayList reference.
>
> At runtime, with the ArrayList reference, suppose we want to get control
> reference named "test" on third Tabpage, we can get this reference like
> this:
> ((HashTable)ArrayList[2])["test"]
>
> Does this meet your need? Anyway, this is just one thought of mine, you
> can
> implement your own data structure and your own logic at all.
>
> Hope this helps, thanks
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>