Recent

Author Topic: OPM Viewer - Clone Controls demo  (Read 2710 times)

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
OPM Viewer - Clone Controls demo
« on: April 26, 2020, 01:49:09 pm »
OPM Viewer is the Lazarus version of the OPM Packages website (https://packages.lazarus-ide.org/).

Is done with BGRAControls and the unit clone controls contributed by howardpc.

License: Modified LGPL

Download sources:
https://github.com/lazarusccr/LazarusPackagesViewer

ToDo (bugs):
- ScrollBox Limit (overflow of smallint limit of positions)
- If you select DataControls a division by zero is shown ???
- Try to display multiline text for descriptions (Need to Fix AutoSize of TBCLabel, and using word break option)

Please help me fixing the bugs :)

balazsszekely

  • Guest
Re: OPM Viewer - Clone Controls demo
« Reply #1 on: April 26, 2020, 04:14:30 pm »
Looks great! Thank you @lainz.

Josh

  • Hero Member
  • *****
  • Posts: 1454
Re: OPM Viewer - Clone Controls demo
« Reply #2 on: April 26, 2020, 10:07:37 pm »
Hi

What version of BGRABITMAP and BGRACONTROLS is supported.

Just tried with 6.6.1 and form reports unknown property anchors.?

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

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: OPM Viewer - Clone Controls demo
« Reply #3 on: April 26, 2020, 10:31:27 pm »
@josh
Close Lazarus.
Open the file umain.lfm in a simple text editor.
Scroll down until you find the section beginning:
Code: Pascal  [Select][+][-]
  1. object bccCategory: TBCComboBox
Somewhere a few lines below will be a line beginning
Code: Pascal  [Select][+][-]
  1.   Anchors = [ ...
Delete that line completely and save the file.
Then try reopening the project in Lazarus.

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: OPM Viewer - Clone Controls demo
« Reply #4 on: April 27, 2020, 04:07:53 am »
Hi, or use dev branch of BGRAControls, there are just only 2 new commits, for that I did not make a new release.

Josh

  • Hero Member
  • *****
  • Posts: 1454
Re: OPM Viewer - Clone Controls demo
« Reply #5 on: April 27, 2020, 04:57:48 pm »
Hi

Yep that solved it, removing the anchors from lfm.

Looks interesting, note the form position i think would be better pocenterscreen, not centerdesktop, as on multimonitor it is cut bewteen them.

The error when datacontrols selected, I think has something to do with autosizing causing many setbounds, if i comment out line in laztracer.pas line 50
//  if (length(Msg) div (length(Msg) div 10000))=0 then ; 

then it runs fine, it looks a strange line though.

Done some further test.
If I remove the autosizing and anchoring from the package panel, and it containg components, it works without having to commen out the laztracer.pas file.
But it then does not display well formatted.

I could be totally wrong though.
« Last Edit: April 27, 2020, 05:10:12 pm by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: OPM Viewer - Clone Controls demo
« Reply #6 on: April 27, 2020, 11:32:55 pm »
Hi!

If you end up at this line

Code: Pascal  [Select][+][-]
  1. if (length(Msg) div (length(Msg) div 10000))=0 then ;  

it is often the result of an infinit loop while the auto-sizing.

So it seems that you are right with "a lot of setbounds".

Winni

lainz

  • Hero Member
  • *****
  • Posts: 4741
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: OPM Viewer - Clone Controls demo
« Reply #7 on: April 28, 2020, 02:49:03 am »
Nice to know I still can break the LCL  ::) Like in the old days...

Anyways, I think I should use another way of placing the items, but I like ChildSizing because is easier...

 

TinyPortal © 2005-2018