Borland - Style buttons for Paradox for Windows.

		by Randy Magruder (with Bob Lenarcik)

Here for your pleasure are buttons with the Borland style look 
and feel.  They are all named BTNxxxxxxx where xxxxxxxx is the 
description of the caption of the button.  For example, btnOK
is an OK button, Borland Style.

To use these buttons just clip them and paste them into your 
forms.  That's it!  Like all good objects, they know how to behave
exactly as if they were Borland 2-state pushbuttons.  You even
have a pushbutton method on them which enables you to write code
on them (wouldn't be much good without that, huh?)

Implementation
--------------

First of all, you'll note that these are NOT really buttons!  
They consist of a box object containing two bitmaps objects.  Each
bitmap was extracted from Resource Workshop, pasted in, and 
aligned.  There is NO ObjectPAL code on these bitmap objects.
All the code is on the box wrapper.  All I do is toggle the
visible state whenever you mouseDown/Up on the button so that
you can see the underlying down state bitmap.

Another note is that boxes do not have pushbutton methods.  
However, we DO have method overloading in ObjectPAL.  This
allows you to create a pushbutton() method as a custom 
method on a box, and 'fool' Paradox for Windows into placing
it into the list of built-in methods.  The MouseUp on the 
box restores the 'up state' and then calls self.pushbutton().

Again, all the code for these buttons is fully encapsulated
and safe to use.  

Feel free (even encouraged!) to use any bitmap editor to
make new and more fun buttons.  Its a piece of cake to install
them:

- Select the button (I suggest you clone one so you don't over-
write your current button)

- Bring up the Object Tree so you can see the two bitmap objects,
  called btnDown and btnUp.  Inspect each button and use the
  Define Graphic... property to paste in your new bitmaps.

- Rename the button:  I suggest btnXXXXXX where XXXXXX describes
the label.


That's it!


Enjoy!

Randy Magruder
Paradox for Windows QA



 
