Board index » Visual Studio » How do I reindex a control array???

How do I reindex a control array???

Visual Studio381
I have many frames on a form that are a control array. When I use mz-tools

to set the tab index properties of all the controls, it doesn't set them

properly because one frame is out of order on the form. I have to manually

find and adjust the tab index property everytime I make a change to the

form. If I can re-index the frame array, it would solve my problems.

--



Thanks.


-
 

Re:How do I reindex a control array???

"Saucer Man" <saucerman@nospam.net>wrote in message



Quote
I have many frames on a form that are a control array. When I use mz-tools

to set the tab index properties of all the controls, it doesn't set them

properly because one frame is out of order on the form. I have to manually

find and adjust the tab index property everytime I make a change to the

form. If I can re-index the frame array, it would solve my problems.



Just change the Index property of the frames. Choose the one you want to

move first and set its index to something beyond the end of your current

array (use something crazy, like 1000). Then start decrementing every

following frame's index and finally set your moved frame's index to the

right number. Let's say you want to move 2 to 5 out of 8 total (0 - 7):



2 -->1000

3 -->2

4 -->3

5 -->4

2 -->5



0, 1, 6, and 7 aren't touched.





-

Re:How do I reindex a control array???

"Jeff Johnson" <i.get@enough.spam>wrote in message

Quote
"Saucer Man" <saucerman@nospam.net>wrote in message

news:zg5yg.2670$dF2.334@bignews1.bellsouth.net...



>I have many frames on a form that are a control array. When I use

>mz-tools to set the tab index properties of all the controls, it

>doesn't set them properly because one frame is out of order on the

>form. I have to manually find and adjust the tab index property

>everytime I make a change to the form. If I can re-index the frame

>array, it would solve my problems.



Just change the Index property of the frames. Choose the one you want

to move first and set its index to something beyond the end of your

current array (use something crazy, like 1000). Then start

decrementing every following frame's index and finally set your moved

frame's index to the right number. Let's say you want to move 2 to 5

out of 8 total (0 - 7):



2 -->1000

3 -->2

4 -->3

5 -->4

2 -->5



1000 ->5

<g>



Quote
0, 1, 6, and 7 aren't touched.



--

Reply to the group so all can participate

VB.Net: "Fool me once..."



-

Re:How do I reindex a control array???

"Bob Butler" <tiredofit@nospam.ever>wrote in message



Quote
>2 -->1000

>3 -->2

>4 -->3

>5 -->4

>2 -->5



1000 ->5



Oh yeaaaaaaah. That's what happens when I think instead of do.





-

Re:How do I reindex a control array???

Thanks!



--



Thanks.





"Jeff Johnson" <i.get@enough.spam>wrote in message

Quote
"Bob Butler" <tiredofit@nospam.ever>wrote in message

news:OnxlqLasGHA.1976@TK2MSFTNGP02.phx.gbl...



>>2 -->1000

>>3 -->2

>>4 -->3

>>5 -->4

>>2 -->5

>

>1000 ->5



Oh yeaaaaaaah. That's what happens when I think instead of do.







-