[RESOLVED] Setting a "load"ed object within a frame
How do I? I have many frames on a form that I am using as windows like in Windows and I want to also load a title bar, drag bar and such within each frame as I load a new frame. So, if the name of the frame was fraWindow(10) and I then loaded lblTitle(10) and wanted to put it within the frame so that if the frame is moved the label moves with it, what do I do?
I currently have a simple working interface with draggable "windows" on it and I am now working on trying to get the windows dynamically loaded on startup rather than having to be set up at design time :-)
Re: Setting a "load"ed object within a frame
you need to set the container property of each control to indicate which frame it belongs to
Re: Setting a "load"ed object within a frame
Quote:
Originally Posted by westconn1
you need to set the container property of each control to indicate which frame it belongs to
I tried that...The line I use is
VB Code:
lblTitle(4).Container = fraWindow(4)
However, it loads into frame 0 with or without that line. Here's the full code for the form loading section I have written
VB Code:
Load fraWindow(4)
fraWindow(4).Top = 500
fraWindow(4).Left = 500
fraWindow(4).Visible = True
Load lblTitle(4)
lblTitle(4).Visible = True
lblTitle(4).Container = fraWindow(4)
lblTitle(4).BackColor = vbGreen
lblTitle(4).Width = 1000
lblTitle(4).Top = 200
lblTitle(4).Caption = "testing"
Re: Setting a "load"ed object within a frame
Additionally...I've noticed that even if I *don't* set a container using that line by commenting out the container line, it STILL links to frame 0...it must be an array thing
Re: Setting a "load"ed object within a frame
You need to use Set
Set lblTitle(4).Container = fraWindow(4)
Re: Setting a "load"ed object within a frame