[RESOLVED] Control Arrays VB.NET Compact Framework
Hi there!
I am checking out to find a way to have (simulate?) control arrays (command buttons specificaly) in VB.NET COMPACT Framework.
All solutions that i find say to use the TabIndex or the Tag property. But that only exists in VB.net and not for the Compact Framework. When programming for a PDA, i dont see that property at the command button properties window.
Any ideas on how to have control arrays in vb.net framework??
Thanks
Re: Control Arrays VB.NET Compact Framework
you can make your own array of whatever type (buttons for example) and put all your buttons in that array. Controls are reference types, so you aren't creating MORE controls by doing this, you are simply creating variables that point to the same objects that are on the form.
Re: Control Arrays VB.NET Compact Framework
i see
and how can i do that? create and empty array and add objects one by one?? if so, how do i add odjects to the array?
Thanks
Re: Control Arrays VB.NET Compact Framework
Are you using VB.NET 2003 or 2005? I have a control array example project in 2003 if you use that. Its a regular winforms app, but I don't think it does anything that isn't available in the CF.
Re: Control Arrays VB.NET Compact Framework
2003
It would be really helpfull i you could send that. Thank you very much for so fast replies.
Re: Control Arrays VB.NET Compact Framework
here I had made it for someone with a similar question. You can find the DL here
http://www.vbforums.com/showthread.p...=control+array
Re: Control Arrays VB.NET Compact Framework
I will check it out now. Thank you very much again.
Re: Control Arrays VB.NET Compact Framework
The example you sent me uses tabindex. I dont have that on the compact framework for the command buttons.
Or isnt it necessary??
Re: Control Arrays VB.NET Compact Framework
What are you doing with control arrays in the CF? What's the purpose?
Re: Control Arrays VB.NET Compact Framework
I have 10 command buttons. I want whenever you click one of those, a single event to be called and only diference should be the index number(an integer) of the button clicked.
Re: Control Arrays VB.NET Compact Framework
I could be completely wrong but I don't think you can get index numbers as you want them in .NET.
You could assign integer values to the Tag property instead and use that as your index value. Just a suggestion.
Re: Control Arrays VB.NET Compact Framework
Thanks but i am reminding again that tag properties are not available on the command buttons of the compact framework
Re: Control Arrays VB.NET Compact Framework
My code doesn't use tabindexes???
Where did you see that?
My code simply creates an array at runtime of the specific textboxes I want in the array, and then loops them.
I tested it on the CF and it works fine.
Re: Control Arrays VB.NET Compact Framework
True and its really helpfull.Thanks!!
Works super fine like this.