Recent

Author Topic: BGRA Controls  (Read 221612 times)

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #225 on: October 28, 2016, 03:23:01 am »
Hope you can solve it. Bug tracker can be slow sometimes. Some bugs I reported years ago are not solved today.

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA-Controls
« Reply #226 on: November 04, 2016, 10:05:40 pm »
BGRA Controls v4.3.1.1:

Added Paper ListBox test
Added External JSON for OPM
Removed fpGUI test
Added description in lpk
Some test fixes
« Last Edit: December 16, 2016, 08:32:34 pm by lainz »

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.1.1
« Reply #227 on: January 01, 2017, 12:06:55 pm »
New website, automatically made with GitHub Pages:
https://bgrabitmap.github.io/bgracontrols/

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.1.2
« Reply #228 on: January 03, 2017, 11:43:07 pm »
BGRA Controls v4.3.1.2:

* Added BCPaperPanel
* Added BCListBox
* Added BCPaperListBox

Now the Paper ListBox is a real control. The only thing left is to use the streaming of the listbox inside the PaperPanel. Currently you can only access the ListBox by code.

Paul_

  • Full Member
  • ***
  • Posts: 143
Re: BGRA Controls v4.3.1.2
« Reply #229 on: March 28, 2017, 08:19:23 pm »
Hello,

When I click in Style manager on the styles what I created it always crashes with "Read error" and 2x "Access violation".
Styles are created on the fly from components what i design previously. After saving it crashes also. So it can't make a preview?

Windows 10, Lazarus 1.6.4 32bit, BGRAControls lastest version

Some advice? :)

« Last Edit: March 28, 2017, 08:20:57 pm by PaulG »

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.1.2
« Reply #230 on: April 03, 2017, 03:07:24 pm »
Hi, sorry for the delay, only 2 of all these styles are broken. These are just text files, and seems that you have invalid properties inside.

Launcher_Button and Settings_Button are broken, the other styles you made are working fine.

Maybe an advice is to save them only from the object inspector, and not from code. If you created them from code, load them from code also.

Or seems that these contains parents properties or something like that that's not supported.
« Last Edit: April 03, 2017, 03:09:57 pm by lainz »

Paul_

  • Full Member
  • ***
  • Posts: 143
Re: BGRA Controls v4.3.1.2
« Reply #231 on: April 25, 2017, 04:28:49 pm »
Thanks for answer, I made special form for styles from which is saving working.

Problem is that style contains lot of things instead of graphic design only. It's also breaking anchors and so.

But anyway, thanks for great stuff :)


lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.1.2
« Reply #232 on: April 25, 2017, 05:35:30 pm »
How you saved it? From the object inspector or from code?

I'm not the author of that control BTW, I just contributed some code on it. These properties should not be stored I think..

Paul_

  • Full Member
  • ***
  • Posts: 143
Re: BGRA Controls v4.3.1.2
« Reply #233 on: April 25, 2017, 08:47:28 pm »
I tried:
1) Select  button on the form + rightclick/Assign style/Create new style from.. 
2) Select  button on the form + in Object inspector/AssignStyle property/Create new style from .. 

Both have same problems.

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.1.2
« Reply #234 on: April 25, 2017, 09:19:46 pm »
I tried:
1) Select  button on the form + rightclick/Assign style/Create new style from.. 
2) Select  button on the form + in Object inspector/AssignStyle property/Create new style from .. 

Both have same problems.

Ok. I'm not sure if it's ok to touch that code BTW..

But I can tell from the code I wrote. You can use:
Code: Pascal  [Select][+][-]
  1. { Save all published settings to file }
  2.     procedure SaveToFile(AFileName: string);
  3.     { Load and assign all published settings from file }
  4.     procedure LoadFromFile(AFileName: string);
  5.     { Assign the properties from AFileName to this instance }
  6.     procedure AssignFromFile(AFileName: string);

SaveToFile... this stores all properties, like saving a new theme does
LoadFromFile... this is like loading entirely all settings
AssignFromFile... this is what you want, it apply only the style related stuff

but i not tested in the case you say, may work or have the same bug as the other.

another way is style only one button and call assign from another control that needs the same style.

i know is not the best solution, i'm not working on this from a lot of months

MISV

  • Hero Member
  • *****
  • Posts: 772
Re: BGRA Controls v4.3.1.2
« Reply #235 on: May 22, 2017, 05:54:33 pm »
Sorry for crashing this thread.

These controls - is there any way to use this for skinning without you have to remove all your old controls and place the new ones. Is there some way these controls can be applied runtime upon startup?


lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.1.2
« Reply #236 on: May 25, 2017, 12:25:02 am »
Sorry for crashing this thread.

These controls - is there any way to use this for skinning without you have to remove all your old controls and place the new ones. Is there some way these controls can be applied runtime upon startup?

There's no way since these are not compatible property by property-

Paul_

  • Full Member
  • ***
  • Posts: 143
Re: BGRA Controls v4.3.1.2
« Reply #237 on: May 25, 2017, 01:23:17 am »
Probably not all, but you can try this: in Object Inspector select component / right click / change class

It's working e.g. for TButton / TBCButton, labels etc. I changed maybe 20 components and  got no error and app was working correctly.


MISV

  • Hero Member
  • *****
  • Posts: 772
Re: BGRA Controls v4.3.1.2
« Reply #238 on: May 25, 2017, 07:15:16 pm »
But if you check this help page it states
http://wiki.freepascal.org/Lazarus_Custom_Drawn_Controls

Quote
Imitates the Windows 7 look, and also can be used to imitate Windows XP and Windows 8 look, and most msstyles or Windows skins. Currently is available only with BGRABitmap graphic library, and you can get this drawer in the BGRAControls package: BGRAControls
You can try to get this working if you convert the slicescaling.pas unit. The technique used to draw the images is 9-slice scaling.
Some working code to create 9-slice scaling is available here: http://sourceforge.net/p/bmpthemeutils/home/Home/

So BGRAControls seems to contain an import drawer for LCL-cusomdraw - one where I somehow (not specified in help how, but possibly obvious when you get started using dsWindows7) even can select another substyle of dsWindows7 (i.e. the drawer supports win8 look and various ms styles as well)

Is this just like a "bonus" or is there some kind of correlation between LCL-customdraw and BGRAControls?

i.e. if I can experiment drawing my app on Win+Mac in unspecified microsoft styles hat sounds pretty close to perfect skinning.
« Last Edit: May 25, 2017, 07:17:10 pm by MISV »

lainz

  • Hero Member
  • *****
  • Posts: 4449
    • https://lainz.github.io/
Re: BGRA Controls v4.3.1.2
« Reply #239 on: May 25, 2017, 10:22:11 pm »
Is everything in the demo. The code is simple to read also.

It works with bitmaps like normal Windows themes does. A bitmap contains the style for the control. If you change the bitmaps, you change the look of the control.

Currently a theme is stored in a zip file, that's loaded and theme applied.

 

TinyPortal © 2005-2018