Recent

Author Topic: New DockedFormEditor  (Read 13568 times)

Michl

  • Full Member
  • ***
  • Posts: 226
New DockedFormEditor
« on: February 14, 2021, 09:23:23 pm »
Hi,

I created a new docked form editor, which can be found in Lazarus Trunk via MainMenu -> Package -> Install/Uninstall Packages... dockedformeditor. It comes with a optional WYSIWYG anchor designer. You have to deinstall other docked form editors like Sparta_DockedFormEditor first!

This package is initially forked from Sparta_DockedFormEditor and its replacement in future Lazarus versions. All Sparta packages are now deprecated and will be removed in a future Lazarus release.

For more info, I wrote a little Wiki page: https://wiki.lazarus.freepascal.org/DockedFormEditor

It's written and tested on Windows 7 and fundamental tested on Windows 10, Linux Mint Cinnamon with GTK2, QT(4) and QT5. It can be used as standalone IDE extension or in combination with AnchorDockingDsgn.

Now I need your support. Please test it - especially if you are currently using Sparta_DockedFormEditor - if there are open bugs or feature requests. If possible, use bug tracker for bugs!

Thank you!

Michl

Known Issues:
    - when form / frame is moved out of screen, there the form has no designer grid (dots)
    - Qt5 shows own menu in form, this isn't shown in anchor editor
    - designer: mouse wheel to scroll content doesn't work - csDesigning is set and
      form doesn't get a LM_MOUSEWHEEL message
    - if main menu is visible, height of client area is wrong, see https://bugs.freepascal.org/view.php?id=38701
    - UnDo / ReDo of AnchorDesigner is currently not implemented
« Last Edit: April 13, 2021, 07:48:04 am by Michl »
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

Michl

  • Full Member
  • ***
  • Posts: 226
Re: New DockedFormEditor
« Reply #1 on: April 13, 2021, 07:39:52 am »
There was a question in a other thread and Sparta https://forum.lazarus.freepascal.org/index.php/topic,54041.

Maybe if interesting. If you want to check with a stable release, you can test the added zip (for Lazarus 2.0.xxx only!). If you want check with Lazarus Trunk, please test version shipped with Lazarus Trunk as mentioned above.

Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

El Salvador

  • Full Member
  • ***
  • Posts: 133
Re: New DockedFormEditor
« Reply #2 on: April 13, 2021, 09:31:45 am »
Why was a fork created? Wasn't it better to continue without forking?

Michl

  • Full Member
  • ***
  • Posts: 226
Re: New DockedFormEditor
« Reply #3 on: April 13, 2021, 10:11:54 am »
The idea of Sparta was adding of new designer functionality. Therefore there was a big overhead of code and a lot of access points and of course mixture of its packages. Sparta_SmartFormEditor was in source of Lazarus for a long time but, as I can see, never working. All changes made in new DockedFormEditor would have broken this package even more. Thatswhile it stays untouched.

Sparta can exists further as alternative (I think in Lazarus CCR), if someone is willing to investigate here. But there is no Lazarus developer working on it.
« Last Edit: April 13, 2021, 10:15:05 am by Michl »
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

mav

  • Jr. Member
  • **
  • Posts: 79
Re: New DockedFormEditor
« Reply #4 on: April 13, 2021, 01:10:34 pm »
There is not DockedFormEditor in trunks....

Michl

  • Full Member
  • ***
  • Posts: 226
Re: New DockedFormEditor
« Reply #5 on: April 13, 2021, 01:39:47 pm »
Try MainMenu -> Package -> Package Links ... -> Rescan lpl files. This should work. If not, you can open the package in LazarusDirectory\components\dockedformeditor\dockedformeditor.lpk.
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

El Salvador

  • Full Member
  • ***
  • Posts: 133
Re: New DockedFormEditor
« Reply #6 on: April 13, 2021, 04:29:22 pm »
There was a question in a other thread and Sparta https://forum.lazarus.freepascal.org/index.php/topic,54041.

Maybe if interesting. If you want to check with a stable release, you can test the added zip (for Lazarus 2.0.xxx only!). If you want check with Lazarus Trunk, please test version shipped with Lazarus Trunk as mentioned above.
Tried in Lazarus 2.0.12. But I had to close all open files and reopen them to use DockedFormEditor. Again, after changed DFF's settings.

Soner

  • Sr. Member
  • ****
  • Posts: 305
Re: New DockedFormEditor
« Reply #7 on: April 13, 2021, 05:59:22 pm »
It looks good in pictures but why don't you use TNotebook and add 3 buttons in source-editors  statusbar for switching between code, form and anchors. We need every vertical space.

Soner

  • Sr. Member
  • ****
  • Posts: 305
Re: New DockedFormEditor
« Reply #8 on: April 13, 2021, 06:26:26 pm »
Here is how to do it, maybe my solution is better for cross platform, look at attachment.
« Last Edit: April 13, 2021, 06:31:29 pm by Soner »

Michl

  • Full Member
  • ***
  • Posts: 226
Re: New DockedFormEditor
« Reply #9 on: April 13, 2021, 07:35:04 pm »
Tried in Lazarus 2.0.12. But I had to close all open files and reopen them to use DockedFormEditor. Again, after changed DFF's settings.
Thank you for testing. I don't understand. Can you explain a little bit more detailed?
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

Michl

  • Full Member
  • ***
  • Posts: 226
Re: New DockedFormEditor
« Reply #10 on: April 13, 2021, 07:37:29 pm »
It looks good in pictures but why don't you use TNotebook and add 3 buttons in source-editors  statusbar for switching between code, form and anchors. We need every vertical space.
If you want more space, why don't you place the tabs on the right or left side? See MainMenu -> Tools -> Options -> Docked Form Editor -> Tab position
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

Michl

  • Full Member
  • ***
  • Posts: 226
Re: New DockedFormEditor
« Reply #11 on: April 13, 2021, 07:42:11 pm »
Here is how to do it, maybe my solution is better for cross platform, look at attachment.
Thank you for testing and your example. For me it is important to not move the mouse far distances. If I have to do it, I'm faster with keybord. Thats the reason, why the tabs are next to the source editor tabs by default. You can change this per option.

But I'm wondering, why is your solution more cross platform suitable then a PageControl?
« Last Edit: April 13, 2021, 07:46:59 pm by Michl »
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

El Salvador

  • Full Member
  • ***
  • Posts: 133
Re: New DockedFormEditor
« Reply #12 on: April 13, 2021, 08:01:25 pm »
Tried in Lazarus 2.0.12. But I had to close all open files and reopen them to use DockedFormEditor. Again, after changed DFF's settings.
Thank you for testing. I don't understand. Can you explain a little bit more detailed?
After you change the tab position setting, you must reopen all forms previously opened (or restart IDE) because tab position remained unchanged. Basically, the setting only affects future forms.

Same way, if you open lazarus project with forms previously opened. In this case, the steps are:

1 Open docked lazarus project without DFF
2 Open some forms (they are floating)
3 Install DFF
4 With the reopening of Lazarus, the forms will remain floating and not docked with DFF. I must close them and reopen.

Soner

  • Sr. Member
  • ****
  • Posts: 305
Re: New DockedFormEditor
« Reply #13 on: April 13, 2021, 08:15:26 pm »
But I'm wondering, why is your solution more cross platform suitable then a PageControl?
Not compared to PageControl, I mean my solution can be more cross platform compared to Zarko Gajic's solution.

Michl

  • Full Member
  • ***
  • Posts: 226
Re: New DockedFormEditor
« Reply #14 on: April 13, 2021, 08:17:34 pm »
Tried in Lazarus 2.0.12. But I had to close all open files and reopen them to use DockedFormEditor. Again, after changed DFF's settings.
Thank you for the hint. This was working. I managed to get it broken somehow. I'll fix that.

[Edit] Fixed in Lazarus Trunk revision 64987.


1 Open docked lazarus project without DFF
2 Open some forms (they are floating)
3 Install DFF
4 With the reopening of Lazarus, the forms will remain floating and not docked with DFF. I must close them and reopen.
OK, I have done it exactly as you wrote, I can't see it, neither in Lazarus 2.0.10 nor in 2.1. (Windows 7).

What is your OS and FPC?
« Last Edit: April 13, 2021, 08:33:00 pm by Michl »
Code: [Select]
type
  TLiveSelection = (lsMoney, lsChilds, lsTime);
  TLive = Array[0..1] of TLiveSelection;

 

TinyPortal © 2005-2018