gettingstarted
[Top] [All Lists]

Re: Pushbutton1.Push, is there an equivalent for BevelButton1

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Pushbutton1.Push, is there an equivalent for BevelButton1
From: Lennox Jacob <lenpartico at yahoo dot com>
Date: Mon, 31 Jul 2006 05:38:58 -0700 (PDT)
Delivered-to: listarchive at realsoftware dot com
Delivered-to: gettingstarted at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=U+7fzYbjMe3+WmXjdRVVP8BbY4BPfwhygJ9j9h9KwGa0SBHBS6z3XU9N1Uow3IEkShTLHNLu2prnb3Y7ZJEWWk+s+MjpCdW4gnnGdVXbwFS4bjaWS9d+3/57eWolo5BpiyMnjro6/g0QPKIY7MWXRHZmoLmg0mjFlQYFehvcgak= ;
Thanks Arnaud,
Works great.
Lennox

Arnaud Nicolet <arnaud at tribu dot ch> wrote: Le 31 juil. 06 � 07:05 Matin, 
Lennox Jacob a �crit:

> Hello,
> To activate Pushbutton1 when a window containing it is opened,  
> coding Pushbutton1.push does it.
> Now when a window containing BevelButton1 is opened, coding for its  
> caption e.g BevelButton.caption = "6" will open BevelButton1 and  
> its caption would be 6, but how can its Action event be activated  
> programatically?
> Thanks.
> Lennox.

The case of the pushbutton is an exception.

For bevel button, you can't "push" it programatically. You have to  
move the bevel button's action code to a method. Then, you call the  
method from the bevel button and also from where you'd use  
pushbutton.push if it were a pushbutton.

For example:

now, you have:

sub BevelButton1.action()
 someCodeHere
end sub

and you try to use:

BevelButton1.push

somewhere else (which does not work).

Changes to make:

Add a method to the window (for example: "BevelButton1Pushed")

Move the code of the BevelButton1.action() to this new method (the  
code should not remain in its original event):

Sub BevelButton1Pushed()
 someCodeHere
end sub

Then, change the sub of the bevel button:
sub BevelButton1.action()
 BevelButton1Pushed
end sub

That's all. You can now call BevelButton1Pushed 
anywhere._______________________________________________
Unsubscribe or switch delivery mode:


Search the archives of this list here:



                        
---------------------------------
See the all-new, redesigned Yahoo.com.  Check it out.
_______________________________________________
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>


<Prev in Thread] Current Thread [Next in Thread>