Recent

Author Topic: BGRA Controls  (Read 241744 times)

lainz

  • Hero Member
  • *****
  • Posts: 4608
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA Controls
« Reply #510 on: May 06, 2024, 05:31:45 pm »
Thanks for testing, new release
https://github.com/bgrabitmap/bgracontrols/releases/tag/v9.0.1.1

Fixed transparency for linux in slider

bobby100

  • Sr. Member
  • ****
  • Posts: 260
    • Malzilla
Re: BGRA Controls
« Reply #511 on: May 06, 2024, 08:01:23 pm »
Hi lainz,

I am using Lazarus 2.2.6 on Win10, and there is a problem with BCFluentSlider in the latest release (screenshot in attachment):
The position is wrong, and the slider length is wrong.

Is there a compatibility problem with Lazarus 2.2.6?

I didn't update to latest Lazarus because I have 2.2.6 on all my machines (Win, Linux, OSX and FreeBSD), and I have fear of updating it in on OSX because it was a hell of the job to get it working at all, and I do not remember what and I how I get it working.

lainz

  • Hero Member
  • *****
  • Posts: 4608
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA Controls
« Reply #512 on: May 06, 2024, 11:09:03 pm »
Hi lainz,

I am using Lazarus 2.2.6 on Win10, and there is a problem with BCFluentSlider in the latest release (screenshot in attachment):
The position is wrong, and the slider length is wrong.

Is there a compatibility problem with Lazarus 2.2.6?

I didn't update to latest Lazarus because I have 2.2.6 on all my machines (Win, Linux, OSX and FreeBSD), and I have fear of updating it in on OSX because it was a hell of the job to get it working at all, and I do not remember what and I how I get it working.

I tested in Mint 32 bit, lazarus 2.2.4, no problems... I don't know in 2.2.6

bobby100

  • Sr. Member
  • ****
  • Posts: 260
    • Malzilla
Re: BGRA Controls
« Reply #513 on: May 07, 2024, 01:16:35 am »
Tested on Mint 64 bit with Lazarus 2.2.6 - same problem like on Windows 10.
Horizontal slider is OK, but vertical is messed up.

lainz

  • Hero Member
  • *****
  • Posts: 4608
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA Controls
« Reply #514 on: May 07, 2024, 03:39:43 am »
Tested on Mint 64 bit with Lazarus 2.2.6 - same problem like on Windows 10.
Horizontal slider is OK, but vertical is messed up.

Tested in latest Fixes.

Same bug only with designer. The example created with code works fine.

hedgehog

  • New Member
  • *
  • Posts: 48
Re: BGRA Controls
« Reply #515 on: May 07, 2024, 07:17:02 am »
Guys, give me some time, I'll check.
My apologies, I thought I tested it well :(
....
Done.
1) Change line 344
Was:
Code: Pascal  [Select][+][-]
  1.  Bitmap.DrawLineAntialias(x + xy1, y, x+ xy2, y, c, FBorderWidth);
Now:
Code: Pascal  [Select][+][-]
  1.  Bitmap.DrawLineAntialias(p.x + xy1, y, p.x+ xy2, y, c, FBorderWidth);

2) Add a new line
Code: Pascal  [Select][+][-]
  1. procedure TBCFluentSlider.SetOrientation(AValue: TSliderOrientation);
  2. var
  3.   k: integer;
  4. begin
  5.   if FOrientation=AValue then Exit;
  6.   k:=abs(ord(FOrientation) - ord(AValue)) + 1;
  7.   FOrientation:=AValue;
  8.   if csLoading in ComponentState then exit; // <<<----- Add this
  9.   if odd(k) or (Width=Height) then
  10.     DiscardBitmap
  11.   else
  12.     SetBounds(Left, Top, Height, Width);
  13. end;  
  14.  
« Last Edit: May 07, 2024, 08:16:15 am by hedgehog »

lainz

  • Hero Member
  • *****
  • Posts: 4608
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA Controls
« Reply #516 on: May 07, 2024, 02:49:57 pm »
Thanks for the fix  :)

New release with the fix
https://github.com/bgrabitmap/bgracontrols/releases/tag/v9.0.1.2
« Last Edit: May 07, 2024, 02:51:41 pm by lainz »

cbeier

  • Newbie
  • Posts: 1
Re: BGRA Controls
« Reply #517 on: May 07, 2024, 03:40:16 pm »
Hi guys!

I'm having a tough time updating the BGRA Controls package. Actually, the package installs successfully, but the new components (BCExpandPanels, BCFluentProgressRing, BCFluentSlider) don't appear in the component palette.

I've already tried to uninstall and install it again, recompile clean, build Lazarus clean, but nothing worked. The package compile and installs without errors. I downloaded the package via OPM.

I'm missing some step or something simple, maybe. Any ideas how to solve this? I really want to try the new components.

lainz

  • Hero Member
  • *****
  • Posts: 4608
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA Controls
« Reply #518 on: May 07, 2024, 04:09:39 pm »
Hi guys!

I'm having a tough time updating the BGRA Controls package. Actually, the package installs successfully, but the new components (BCExpandPanels, BCFluentProgressRing, BCFluentSlider) don't appear in the component palette.

I've already tried to uninstall and install it again, recompile clean, build Lazarus clean, but nothing worked. The package compile and installs without errors. I downloaded the package via OPM.

I'm missing some step or something simple, maybe. Any ideas how to solve this? I really want to try the new components.

OPM should work fine.

If doesn't works try uninstalling bgracontrols and downloading from github releases.

Then open the package file and click on install, then rebuild lazarus.

lainz

  • Hero Member
  • *****
  • Posts: 4608
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA Controls
« Reply #519 on: May 09, 2024, 12:17:28 am »
New release
https://github.com/bgrabitmap/bgracontrols/releases/tag/v9.0.1.3

This release is a fix, because I did the previous releases wrong, sorry, now the lpk has the correct version.

bobby100

  • Sr. Member
  • ****
  • Posts: 260
    • Malzilla
Re: BGRA Controls
« Reply #520 on: May 12, 2024, 05:35:52 pm »
How can I add keyboard handling to a TBGRAGraphicControl descendant?
I need the events like OnKeyPress, OnKeyDown etc.

I am working on a slider component, and I would like to control it with + and - keys on the keyboard.

lainz

  • Hero Member
  • *****
  • Posts: 4608
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA Controls
« Reply #521 on: May 12, 2024, 10:04:06 pm »
Only tbgravirtualscreen can handle keyboard

petevick

  • Sr. Member
  • ****
  • Posts: 419
Re: BGRA Controls
« Reply #522 on: May 13, 2024, 10:28:38 am »
How can I add keyboard handling to a TBGRAGraphicControl descendant?
I need the events like OnKeyPress, OnKeyDown etc.

I am working on a slider component, and I would like to control it with + and - keys on the keyboard.
If you turn on KeyPreview for the form that the slider is on, you could then possibly use the forms OnKeyUp or OnKeyDown event to intercept when + and - keys are pressed.and therefore change the sliders value to suit.
Pete Vickerstaff
Linux Mint 21.2 Cinnamon, Windows 10, Lazarus 3.2, FPC 3.2.2

bobby100

  • Sr. Member
  • ****
  • Posts: 260
    • Malzilla
Re: BGRA Controls
« Reply #523 on: May 13, 2024, 04:31:37 pm »
How can I add keyboard handling to a TBGRAGraphicControl descendant?
I need the events like OnKeyPress, OnKeyDown etc.

I am working on a slider component, and I would like to control it with + and - keys on the keyboard.
If you turn on KeyPreview for the form that the slider is on, you could then possibly use the forms OnKeyUp or OnKeyDown event to intercept when + and - keys are pressed.and therefore change the sliders value to suit.
It won't work with 100 sliders on the form.

@lainz - I can't find anything in tbgravirtualscreen related to keyboard.

lainz

  • Hero Member
  • *****
  • Posts: 4608
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA Controls
« Reply #524 on: May 13, 2024, 05:22:41 pm »
@lainz - I can't find anything in tbgravirtualscreen related to keyboard.

Is a TWinControl descendant, check the parent (several times up) of TBGRAVirtualScreen...

 

TinyPortal © 2005-2018