Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi Dimension Array Question

Status
Not open for further replies.

domt

Programmer
Mar 13, 2001
115
US
I have a large frame, holding an array of eight smaller frames. Each of the smaller frames holds an array of ten labels.
Can anyone show me a procedure for selecting a label?
I assume the labels would be stored in a three dimensional
array.
Any help would be greatly appreciated.
 
What do you mean by 'selecting a label'?

Each control on your Form has a .Container property. Your Label's(x) Container is one of your Frame(y) the label is on, and the Frame's(y) .Container is a larger Frame.

HTH


Have fun.

---- Andy
 
Andy
Thanks for your prompt response.
I've never had occasion to use the .container property. I'll have to study up on it.
In the program I'm working on, the user selects and changes the caption of various labels. All of the the labels are then sequentially read by the program for further action. I assumed a procedure using multi dimensioned arrays would do it.
domt
 
Just a hint:

You may want to loop thru all controls on your Form and take some action:
Code:
Dim cntControl As Control

For Each cntControl In Me.Controls
    If TypeOf cntControl Is Label Then
        cntControl.Caption = "My label"
    ElseIf TypeOf cntControl Is Frame Then
        cntControl.BorderStyle = 0
    End If
Next

This is just an example, and I am sure you may get dipper into any control's stuff if you want to.


Have fun.

---- Andy
 
Thanks Andy, I'll work on it.
domt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top