On Nov 30, 2004, at 3:06 PM, Steve Smith wrote:
I'm trying to set a property in a form that I'm calling. In the VB
world,
I'm used to using the TAG property for this, so I set a public
property in
window1 with the name gTag and then using the following code.
dim w as new window1
w.gTag = "Title"
w.show
However, it appears that the dim w as new window is firing the open
sub in
window1. I expected the w.show to fire it. As a result, the gTag
property
isn't set when the open sub is run.
Correct; the Open event handler is called by the Window constructor.
What's the best way to pass a string (or anything else) to a form?
It depends. If it's a value that the window must have in order to
function, then it should probably be passed in a constructor.
Otherwise, it depends :)
--------------
Charles Yeomans
_______________________________________________
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>
|