Forum > Packages and Libraries

Follow up on New component SuperPanel

(1/2) > >>

Josh:
Hi
Following on from my initial SuperPanel
https://forum.lazarus.freepascal.org/index.php/topic,69908.msg544109.html#msg544109

Runtime resizeable, dragable, heading, min/max/close buttons, lots of coloring options etc.

I have added quite a bit more, min,max,close buttons can be on right or left side.
Resize controls can be on right or both sides, can adjust many parameters.

I have only tested on Windows, so other OS's & widgetset tests would be very helpful.
Any bugs, ideas also welcome.

Enjoy

edit
Just noticed the the zip didnt attach, so trying again.
pic of  test1, multiple panels, if panel has a heading and user moveable is true you can drag it around, if panel has diag lines bottom right then it is resizeable.
it appears in standard palletee red icon.

Josh:
Found a Bug, when buttons did not have a border drawn around them, the hover effect did not work

Fixed version 0.2.12

lainz:
Hi. Maybe you can create a github repository for the package?

Josh:
Hi

Update of SuperPanel.

The close button now has its own event triggered when clicked.

added macos style of buttons options, which are filled circles drawn using a modified Xiaolin Wu's algorithm for antialliasing.

Example 1 is in the pcakage.

d2010:
You make these update

--- Code: ---var
  radius,dx,xl,yl,p,cx,cy:Integer;
  r,g,b:Byte;
  DarkenFactor,Distance,py:Double;
Begin

--- End code ---
You can make update/add.

--- Code: ---Begin
     radius:=00;
     dx:=00;
     p:=000;
     cx:=00;
    cy:=000'
End;
--- End code ---
This Line
  radius:=Min((x2-x1) div 2,(y2-y1) div 2);
With Line
  radius:=Min(x2-x1), (y2-y1));
  radius:=radius div 2;
This Line
    dx:=Round(Sqrt(Sqr(radius)-Sqr(yl)));
  for yl:=-radius to radius do
  begin
    py:=Sqr(yl);
    dx:=Round(Sqrt(Sqr(radius)-Sqr(yl)));
    for xl:=-dx to dx do
With Line
   dx:=Round(Sqrt(Sqr(radius)-py));

This Line
  for yl:=-radius to radius do
  begin
    py:=Sqr(yl);
    dx:=Round(Sqrt(Sqr(radius)-Sqr(yl)));
    for xl:=-dx to dx do
      Begin ...
     End
With Line
  for yl:=-radius to radius do
  begin
    py:=Sqr(yl);
    dx:=Round(Sqrt(Sqr(radius)-Sqr(yl)));
   if  (cy+yl>=y1) and (cy+yl<=y2) then for xl:=-dx to dx do 
    begin  ....

This Line...
// Fill a circle using a modified Xiaolin Wu's algorithm
With Line
  MyAbout:='About DB "Fill a circle using a modified Xiaolin Wu's algorithm"';

Navigation

[0] Message Index

[#] Next page

Go to full version