Category : Paradox DBMS
Archive   : BUTTONS.ZIP
Filename : BORBTN.TXT

 
Output of file : BORBTN.TXT contained in archive : BUTTONS.ZIP
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






  3 Responses to “Category : Paradox DBMS
Archive   : BUTTONS.ZIP
Filename : BORBTN.TXT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/