Sure, a canvas is a programmed button

Create a subclass and set it's parent to Canvas

In it's 'mousedown' event, return true
Create a new event Action
In it's 'mouseup' event, check to see if X and Y are still within the  
button's boundaries and then call your Action event if it is
Draw your button in it's various states inside the 'paint' event.

There are many examples around illustrating this. The canvas is used  
for most custom controls.

- Tom

> I tried to overlay a StaticText field on top of the button and bind
> it to the action event of the button. I followed the RB Users' Guide
> and Charles Yeomans' discussion on custom bindings but cannot make it
> work in this case. I don't know how to do a programmed button push.
> Is it even possible?

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to