Recent

Author Topic: [CLOSED] BGRAControls  (Read 550075 times)

LA.Center

  • Full Member
  • ***
  • Posts: 244
    • LA.Center
Re: BGRAControls
« Reply #450 on: April 02, 2012, 08:54:37 am »
Maybe a dumb question, but why are you redesigning? They are already very good.

lainz

  • Guest
Re: BGRAControls
« Reply #451 on: April 02, 2012, 05:17:54 pm »
Maybe Dibo want to be perfect controls =)

The reasons are all explained by the users in this thread. Basically all of BGRAButton:
- Glyph positioning
- Word wrap
- Custom style of disabled state

BGRAVirtualScreen / BGRAPanel:
- Transparency

BGRAImageButton / BGRASpriteAnimation / BGRAImageManipulation:
- Gain speed, those are a bit slow

etc..

lainz

  • Guest
Re: BGRAControls
« Reply #452 on: April 14, 2012, 12:03:04 am »
*SVN and GIT update*
- Small fix in BGRABitmapThemeUtils. Now vertical progressbar in customdrawn_win7 will be scaled correctly.

(the power of a single line of code..)

BTW if someone know or want to speed up this unit It will be greatly appreciated.
« Last Edit: April 14, 2012, 12:09:01 am by lainz »

lainz

  • Guest
Re: BGRAControls
« Reply #453 on: April 20, 2012, 04:57:37 pm »
Another update for BGRAControls git and svn.

* Fixed font height (at least for Windows)
* Added some default drawing for TCDScrollBar
* Added some default drawing for the 'Slider'

The drawer isn't getting closer to the original Windows style (for now) but at least it's usefull to change the bitmaps and easily get a new look. BTW patches are welcome.
« Last Edit: April 20, 2012, 05:06:02 pm by lainz »

picstart

  • Full Member
  • ***
  • Posts: 236
Re: BGRAControls
« Reply #454 on: April 21, 2012, 05:36:53 pm »
Upgraded to brgabitmappack 5.7.1 brgacontros 1.4 . Package inspector shows them installed without error. Opened an existing ( prior to the upgrade) project that uses brgacontrols and recompiled..it compiles without error but at run time it errors as below.
brgabutton1.BodyChecked.LightWidth unknown property LightWidth
same with button2 and button3 ( there are 3 buttons on the form.
Is there a simple way to fix this short of reworking the whole form?

Observations
buttons are part of a brgapanel and if I create a new test project  the buttons work.
If I delete the buttons in the existing (erroring )project and recreate them by copying the button code into the new buttons the error persists. Yes lightwidth is in the object inspectors property list... It's as if there is a hidden dependency that ties it back to a time when lightwidth didn't exist.
« Last Edit: April 21, 2012, 06:58:57 pm by picstart »

lainz

  • Guest
Re: BGRAControls
« Reply #455 on: April 22, 2012, 07:11:21 pm »
I have no idea.. I always set the bgrabutton style by code.

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: BGRAControls
« Reply #456 on: April 22, 2012, 07:50:12 pm »
By BodyChecked you mean BodyClicked?

picstart

  • Full Member
  • ***
  • Posts: 236
Re: BGRAControls
« Reply #457 on: April 22, 2012, 08:13:26 pm »
Yes Bodyclicked.Lightwidth. My error in copying down the error pop up on running the code.What makes me concerned is that a compile and run should be sufficient and transparent  but if there are hidden dependencies perhaps into some xml file that points to earlier versions such that the compile isn't against the latest components as specified by the packages installed and the IDE version and the FPC version.
When things work Lazarus creates a pleasant exe that can be moved to other directories and is self contained enough to run in a new directory ( no need to move run time libraries).

digeo

  • Jr. Member
  • **
  • Posts: 54
    • Digeotek
Re: BGRAControls
« Reply #458 on: April 25, 2012, 12:30:32 pm »
I am trying to compile the customdrawn_win7 demo with BGRA demos. I receive errors for missing customdrawncontrols. Where can I download?

Any suggestions?
« Last Edit: April 25, 2012, 12:46:07 pm by digeo »

lainz

  • Guest
Re: BGRAControls
« Reply #459 on: May 04, 2012, 03:18:30 pm »
I am trying to compile the customdrawn_win7 demo with BGRA demos. I receive errors for missing customdrawncontrols. Where can I download?

Any suggestions?

search in the wiki, I always get the latest customdrawncontrols with the latest lazarus svn.

----------------

BGRAControls is changing at all, see in this post:
http://lazarus.freepascal.org/index.php/topic,16828.0.html

This is the last update for the current BGRAControls ver. 1.4.0.1
https://sourceforge.net/projects/bgracontrols/

Basically all changes related to customdrawn_win7 drawer (also changes that affect TBGRAImageButton). Enjoy.

r27
Added some default drawing for the 'Slider'.
---------------------
r26
Added some default drawing for TCDScrollBar.
---------------------
r25
Fix in AssignFontToBGRA font height.
---------------------
r24
Small fix in BGRABitmapThemeUtils. Now vertical progressbar in customdrawn_win7 will be scaled correctly.
---------------------
r23
Added 'DrawButtonWithArrow' for ComboBox.
---------------------
r22
Small fix in customdrawn_win7 to work with the latest customdrawn available.
---------------------

digeo

  • Jr. Member
  • **
  • Posts: 54
    • Digeotek
Re: BGRAControls
« Reply #460 on: May 07, 2012, 01:06:16 pm »
I added StaticButton property to have button with no states. The BGRAButton had this property as well.

Made small change to BGRANeoButton draw procedure:

Code: [Select]
procedure TCustomBGRANeoButton.DrawButton;
begin
  if Enabled and not StaticButton then
    case FState of
      gbsNormal: begin
                     DrawBody(StyleNormal);
                     DrawText(StyleNormal);
                 end;
      gbsHover:  begin
                     DrawBody(StyleHover);
                     DrawText(StyleHover);
                 end;
      gbsActive: begin
                     DrawBody(StyleActive);
                     DrawText(StyleActive);
                 end;
    end
  else
  begin
    DrawBody(StyleDisabled);
    DrawText(StyleDisabled);
  end;

  if Enabled and StaticButton then
  begin
    DrawBody(StyleNormal);
    DrawText(StyleNormal);
  end;
end;

lainz

  • Guest
Re: BGRAControls
« Reply #461 on: May 09, 2012, 05:16:21 pm »
I added StaticButton property to have button with no states. The BGRAButton had this property as well.

Made small change to BGRANeoButton draw procedure:

Code: [Select]
procedure TCustomBGRANeoButton.DrawButton;
begin
  if Enabled and not StaticButton then
    case FState of
      gbsNormal: begin
                     DrawBody(StyleNormal);
                     DrawText(StyleNormal);
                 end;
      gbsHover:  begin
                     DrawBody(StyleHover);
                     DrawText(StyleHover);
                 end;
      gbsActive: begin
                     DrawBody(StyleActive);
                     DrawText(StyleActive);
                 end;
    end
  else
  begin
    DrawBody(StyleDisabled);
    DrawText(StyleDisabled);
  end;

  if Enabled and StaticButton then
  begin
    DrawBody(StyleNormal);
    DrawText(StyleNormal);
  end;
end;

Also you can assign the normal state to all the others.

BTW if you do it in one of those ways, when you mouse over and clic the button it will be repainted and that is unnecesary for a static component.

digeo

  • Jr. Member
  • **
  • Posts: 54
    • Digeotek
Re: BGRAControls
« Reply #462 on: May 19, 2012, 11:32:45 pm »
is it possible to draw a bgra container control transparent like in attachment? I find this is possible with a bgra button but the button decent from different control than the bgra panel or virtualscreen and the button is not a container.

lainz

  • Guest
Re: BGRAControls
« Reply #463 on: May 20, 2012, 03:42:25 am »
At least I know that is not possible in a easy way. I remember that if you 'copy the background' and put it as background of the control (don't know how) you can get a transparent panel.

TBGRAButton is TGraphicControl descendant, the others are TPanel or TCustomControl descendant.

If you solve your problem please tell us

https://groups.google.com/group/borland.public.delphi.vcl.components.writing/browse_thread/thread/90f253093d15820e/9385f971b8bf50a4

http://delphicikk.atw.hu/listaz.php?id=1341&oldal=1

http://www.delphigroups.info/2/5/320584.html

http://www.delphigroups.info/3/2/174853.html

lainz

  • Guest
Re: BGRAControls
« Reply #464 on: May 20, 2012, 05:47:31 pm »
Update, added owner drawn ListBox and ComboBox in testbgracontrols (git and svn)


 

TinyPortal © 2005-2018