Thanks Arnaud,
Works great.
Lennox

Arnaud Nicolet <[EMAIL PROTECTED]> 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>

Reply via email to