Thanks for your responses guys.
The 'relative owner' route works perfectly...........
$self->owner->Button2->text("abcd");
and that is good for peer widgets that have the same owner.
But the other approach suggested by Anton doesn't work for me........
$::application->Form1->Button2->text("abcd");
This doesn't appear to do anything. I don't get an error message. If I
change Form1 to Form99 (which doesn't exist) then I get an 'Unknown widget
or method' error (not surprising).
Rick.
-----Original Message-----
From: Anton Berezin [mailto:tobez_at_tobez.org]
Sent: Wednesday, May 08, 2002 3:12 PM
To: Rick Ovenden
Cc: prima_at_prima.eu.org
Subject: Re: Widget referencing in VB events.
On Wed, May 08, 2002 at 02:21:56PM +0200, Rick Ovenden wrote:
> In VB events how are widgets other than $self referenced? For
> example; in the onClick event of Button1 how is the text property of
> Button2 referenced?
$self->owner->Button2->text
or
$::application->Form1->Button2->text
Cheers,
=Anton.
-- | Anton Berezin | FreeBSD: The power to serve | | catpipe Systems ApS _ _ |_ | http://www.FreeBSD.org | | tobez_at_catpipe.net (_(_|| | tobez_at_FreeBSD.org | | +45 7021 0050 | Private: tobez_at_tobez.org |Received on Thu 09 May 2002 - 23:21:44 CEST
This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:04 CET