Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any free shaped button components available? [closed]

I recently downloaded the source to an "open source" project that unfortunately has dependencies on a bunch of expensive proprietary libraries, including Infopower 1stClass, which it seems to use primarily for TfcShapeButton, a component that acts like a standard TBitBtn, except that you can give it an arbitrary polygonal shape by describing a list of points. The DFM code looks like this:

      PointList.Strings = (
        '8,29'
        '18,19'
        '28,29'
        '20,37'
        '16,37')

I'm trying to clean this project up and make it look like a real open-source project that anyone can download and build without having to shell out hundreds of dollars for component libraries, but I'd like to change the look and feel as little as possible. So does anyone know of an open-source shape button component like this that will work with D2009 and up?

like image 744
Mason Wheeler Avatar asked Dec 05 '25 18:12

Mason Wheeler


1 Answers

this piece of code does exactly what you need.

const Points: array [1..5] of tPoint = (
    (x:8;y:29),
    (x:18;y:19),
    (x:28;y:29),
    (x:20;y:37),
    (x:16;y:37) );

begin
  SetWindowRgn(Button2.Handle, CreatePolygonRgn(Points, 5, WINDING), True);
end;
like image 161
PA. Avatar answered Dec 08 '25 19:12

PA.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!