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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control Array Show problem

Status
Not open for further replies.

pungy

Instructor
Aug 5, 2007
71
US
VB 6 Enterprise Edition

I have a Frame that contains 2 option buttons. The frame is called FraOverUnder - Index is set to 0.
The option buttons are called "optOver" and "optUnder"

My code to show the frame is:
Code:
        Load fraOverUnder(VisitorCount)
        fraOverUnder(VisitorCount).Top = fraOverUnder(VisitorCount - 1).Top + fraOverUnder(VisitorCount - 1).Height + 25
        fraOverUnder(VisitorCount).Visible = True
VisitorCount is a variable that is being incremented correctly.

My Problem: When the Frame(fraOverUnder) is loaded and made visible, the option buttons ARE NOT seen.

Can you tell me what the problem is?

Thank You,
Sam
 
I created a new project where the Form contained one FRAME (Control Array) and one OPTION Button(Control Array) within that Frame. The form also contained a COMMAND button.
Here's the code:
Code:
Private Sub Command1_Click()
Load Frame1(1)
Frame1(1).Top = Frame1(0).Top + Frame1(0).Height + 50
Frame1(1).Visible = True
Load Option1(1)
Option1(1).Top = Frame1(1).Height / 2
Option1(1).Visible = True
End Sub

The end result is Option1(1) is being created in FRAME1(0). How would I get it in FRAME1(1)?
 
Problem Solved:

I used this code:
Load Option1(1)
Set Me.Option1(1).Container = Me.Frame1(1)
Option1(1).Left = Option1(0).Left
Option1(1).Top = Option1(0).Top
Option1(1).Visible = True
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top