On Jun 28, 2006, at 4:58 PM, Stephen wrote:
Hi,
I have a window with a PagePanel and ContainerControls on the pages
- so that I can use the ContainerControls in other places...
Anyway - I'm trying to access the .Text value of a control on the
ContainerControl on page 1 (0), to populate a listBox on the
ContainerControl on page 2 (1).
I'm having trouble figuring out the hierarchy of it I think...
I keep getting "This method or property does not exist"
I've tried:
Dim instructer As String
instructor = instructorComboBox.Text // hoping it will just see it!
or
instructor = newLessonContainer.InstructorComboBox.Text // does see
it - but still give me the error!
This has made me waste a whole day!
Thanks!
Stephen
The way I do that is to embed the ContainerControls in code and
retain references to them in window properties. Perhaps someone can
show us a better way but in the meantime here's what I do, as an
example:
Add two window properties: mContainerControl1 as ContainerControl1
and mContainerControl2 as ContainerControl2
Then in window_Open:
dim cc1 as ContainerControl1 = new ContainerControl1
cc1.EmbedWithinPanel PagePanel1, 0, 0, 0
self.mContainerControl1 = cc1
dim cc2 as ContainerControl2 = new ContainerControl2
cc2.EmbedWithinPanel PagePanel1, 1, 0, 0
self.mContainerControl2 = cc2
Then you can reference individual controls on the ContainerControls
like this, for example:
MsgBox self.mContainerControl2.EditField1.Text
MsgBox self.mContainerControl1.EditField1.Text
Best,
Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>