mccainz2
asked on
swap a controls container at runtime
I have a frame (frame 'child') (with controls nested in it). This frame is itself contained in another Frame (Frame 'A').
Now, based on the user preferences I wish to move the frame (frame 'child') to another container frame ('frame B').
So, how would I do this?
Now, based on the user preferences I wish to move the frame (frame 'child') to another container frame ('frame B').
So, how would I do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Here is the txt from a form file that illustrates the concept.... and why it isnt working as intended
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3165
ClientLeft = 60
ClientTop = 375
ClientWidth = 4635
LinkTopic = "Form1"
ScaleHeight = 3165
ScaleWidth = 4635
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame1
Caption = "Frame1"
Height = 2985
Left = 60
TabIndex = 0
Top = 60
Width = 4515
Begin VB.Frame Frame2
Caption = "Frame2"
Height = 1125
Left = 180
TabIndex = 2
Top = 270
Width = 1695
End
Begin VB.Frame Frame3
Caption = "Frame3"
Height = 1545
Left = 2130
TabIndex = 1
Top = 330
Width = 2325
Begin VB.Frame Frame5
Caption = "Frame5"
Height = 825
Left = 690
TabIndex = 4
Top = 180
Width = 1515
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 315
Left = 330
TabIndex = 5
Top = 330
Width = 1035
End
End
End
Begin VB.Frame Frame4
Caption = "Frame4"
Height = 1215
Left = 390
TabIndex = 3
Top = 1560
Width = 1605
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Frame5.Container = Frame2
End Sub