Recent

Author Topic: BGRA Controls  (Read 221604 times)

MISV

  • Hero Member
  • *****
  • Posts: 772
Re: BGRA Controls v4.3.1.2
« Reply #240 on: May 26, 2017, 04:48:39 pm »
Great - then it sounds like Lazarus actually supports a very powerful skinning and styling solution :)

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.1.2
« Reply #241 on: May 26, 2017, 07:34:31 pm »
Great - then it sounds like Lazarus actually supports a very powerful skinning and styling solution :)

Try it then tell us how works for you.

I did my best on it.

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: BGRA Controls v4.3.1.2
« Reply #242 on: May 27, 2017, 12:45:44 am »
Hi, i just wanted to add the running-Lazarus-Cheeta (the logo.gif), an an animation, is there an easy way to add an Animated-gif ? e.G. in a TBGRASpriteAnimation ?
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.1.2
« Reply #243 on: May 27, 2017, 01:06:54 am »
Hi, i just wanted to add the running-Lazarus-Cheeta (the logo.gif), an an animation, is there an easy way to add an Animated-gif ? e.G. in a TBGRASpriteAnimation ?

TBGRASpriteAnimation

try this:

Code: Pascal  [Select][+][-]
  1. procedure AnimatedGifToSprite(Filename: string);

or if you store it as a resource call this:

Code: Pascal  [Select][+][-]
  1. LoadFromResourceName(Instance: THandle; const ResName: string);

Paul_

  • Full Member
  • ***
  • Posts: 143
Re: BGRA Controls v4.3.1.2
« Reply #244 on: May 28, 2017, 08:29:16 pm »
There is one a little bit annoying thing, when you doubleclick BCButton component on form it launches Style manager instead of OnClick property like TButton.

MISV

  • Hero Member
  • *****
  • Posts: 772
Re: BGRA Controls v4.3.1.2
« Reply #245 on: June 05, 2017, 03:01:56 pm »
Great - then it sounds like Lazarus actually supports a very powerful skinning and styling solution :)

Try it then tell us how works for you.

I did my best on it.

Will do - returning to it now.

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.1.2
« Reply #246 on: June 05, 2017, 03:30:01 pm »
Great - then it sounds like Lazarus actually supports a very powerful skinning and styling solution :)

Try it then tell us how works for you.

I did my best on it.

Will do - returning to it now.

Notice that's purely a skin, if you need to improve behaviour you need to modify Custom Drawn, not BGRAControls.

MISV

  • Hero Member
  • *****
  • Posts: 772
Re: BGRA Controls v4.3.1.2
« Reply #247 on: June 05, 2017, 03:47:22 pm »
I very happy if controls/forms can get painted differently.

I am aiming for my software to have same look across platform - and preferably slightly unique look.

For now I reported a bug in Lazarus customdraw 1.6.4/Windows that prevents me from compiling
https://bugs.freepascal.org/view.php?id=31968

But installing your BGRA packages went well - will hopefully get around to testing later today :)


Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 451
  • Programming is FUN only when it works :)
    • Cool Technology
Re: BGRA Controls v4.3.1.2
« Reply #248 on: June 08, 2017, 03:42:17 pm »
 :D Let me start by saying that whoever came up with the idea of writing and developing BGRA components is a GENIUS. I love all the components in BGRA. Thank you. In fact, I am able to use one of your component, BGRA Sprite animation successfully in my program. However, I am trying to use one of the other components in the BGRA tabs but not successful namely TBCButton.

What I am simply trying to do is incorporate TBCButton and enable its 3D polished and glossy look but running into problem. I can easily setup its skin during design time through style manager by double-clicking on button. However, I want to be able to do this while runtime programmatically or with my code, but I searched and searched for an answer there is seem to none. I selected the TBCButton and looked in its object inspector. It has style properties but only with two different options - bbtbutton and bbtdropdown.

So, how do you programmatically change the skin of the TBCButton? or Can you? If you can, could you please show me a sample code. Thank you.

I did ask a question related to this issue in the general section and got no reply. Here is the link to that question, which also has images attached to it. https://forum.lazarus.freepascal.org/index.php/topic,37108.msg248335.html#msg248335
« Last Edit: June 08, 2017, 03:46:41 pm by Awesome Programmer »

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.1.2
« Reply #249 on: June 08, 2017, 03:53:18 pm »
You can, check the demos, at least are two demos showing this how to.

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.2
« Reply #250 on: August 18, 2017, 04:27:35 pm »
BGRAControls v4.3.2.0
https://github.com/bgrabitmap/bgracontrols/releases

- PreserveGlyphOnAssign added, by default is on and prevents the glyph being replaced in any Assign call.
- BCImageButton toggle functionality: Now you can use it as 'toggle' button, and get/set pressed state.
- Using .lrs instead of .rc (bcpaperlistbox)
- published Constraints in bcbutton
- Added LoadFromBitmapResource overloaded method with less parameters
- Improved BCPaperListBox, now it has a property editor.

Notice the change on Assign, if this breaks your current code, just toggle PreserveGlyphOnAssign off in the object inspector.

Josh

  • Hero Member
  • *****
  • Posts: 1270
Re: BGRA Controls v4.3.2
« Reply #251 on: September 15, 2017, 03:09:45 pm »
Hi
I am having a problem where BCLabel and BCButton is not displaying Russian, all I get is [][][][]....
A standard TLabel is displaying correctly when I select Eurostile or Gill San Font ( these are the 2 main ones I use), when i change fontex to same font; i get the above.

The best way to get accurate information on the forum is to post something wrong and wait for corrections.

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.2
« Reply #252 on: September 15, 2017, 07:39:27 pm »
Hi
I am having a problem where BCLabel and BCButton is not displaying Russian, all I get is [][][][]....
A standard TLabel is displaying correctly when I select Eurostile or Gill San Font ( these are the 2 main ones I use), when i change fontex to same font; i get the above.

Hi, that happens, for example, with TBCImageButton also?

Remember we're using BGRABitmap, maybe you can test this:
- Add a BGRAVirtualScreen
- Add OnRedraw event
- Write something with that font in that event, so we can see if BGRABitmap library can use that kind of fonts. If yes the problem is in the controls, if not the problem is with BGRABitmap.

Josh

  • Hero Member
  • *****
  • Posts: 1270
Re: BGRA Controls v4.3.2
« Reply #253 on: September 15, 2017, 08:44:13 pm »
Hi Lainz,

Done some testing with other bgracontrols

Image attached
BCLabel
BCMaterialsDesignButton
BCImageButton.

So far BCImage Button is the only one which is showing the font and language correctly.
« Last Edit: September 15, 2017, 09:35:21 pm by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.2
« Reply #254 on: September 16, 2017, 12:37:00 am »
Hi Lainz,

Done some testing with other bgracontrols

Image attached
BCLabel
BCMaterialsDesignButton
BCImageButton.

So far BCImage Button is the only one which is showing the font and language correctly.

Ok. That's strange, I did BCImageButton and BCMaterialDesignButton, and one works and the other doesn't works  :o
Sure is the text drawing function we're using, one different for each control.

 

TinyPortal © 2005-2018