Forum > Designer

Embded form editor (DockedFormEditor fork)

(1/2) > >>

K155LA3:
The DockedFormEditor component from Michael W. Vogel (version of approximately early 2021 ) is taken as the basis. Renamed to "EmbdedFormEditor" in order to avoid confusion.
Main changes:
1. Added TitleBar. When you double click on TitleBar, the form caption editor is launched. When clamping the left mouse button on the TitleBar and the mouse movement, the form position editor on Desktop starts.
2. When the sizes of the form change, a hint appears indicating the current form size.
3. Added the implementation of the main menu with any level of nested , as well as the display of glyphs (where they are there). If you select the menu item (if item does not have nested items), the editor automatically select the corresponding component in the object inspector.
4. Solved the position of the StatusBar position: when adding the main menu, all components are lowered down to the height of the main menu. When you turn on the "smart position StatusBar" StatusBar lying on the form rises up by an equal to the height of the main menu. This behavior is implemented via the StatusBar.BorderSpacing.Bottom parameter. The StatusBar.BorderSpacing.Bottom parameter is added to the corresponding value when the file / project saving event occurs when the project compilation is occurred, switching from the form editor to the code editor. Since there may be unexpected problems This option may be turned off in the settings.

За основу взят компонент DockedFormEditor от Michael W. Vogel (версия приблизительно начала 2021 года). Переименовано в "EmbdedFormEditor" во избежании путаницы.
Основные изменения:
1. Добавлен заголовка формы. При двойном клике по заголовку запускается редактор текста заголовока формы. При зажатии левой кнопки мыши на заголовке и поледующем движении мыши запускается редактор положения формы на рабочем столе.
2. При изменении размеров формы появляется подсказка, указывающая текущий размер формы.
3. Добавлена реализация основного меню с любым уровнем вложения, а также отображением глифов (там где они есть). При выборе пункта меню (если пункт не имеет вложенных пунктов меню) в редакторе автоматически происходит выбор соответсвующего компонента в инспекторе объектов.
4. Решена проблема положения StatusBar: при добавлении главного меню все компоненты опускаются вниз на высоту главного меню. При включении "умного положения StatusBar" StatusBar лежащий на форме поднимается вверх на величину равную высоте главного меню. Данное поведение реализовано через параметр StatusBar.BorderSpacing.Bottom. Соответсвенно добавлено обнуление параметра  StatusBar.BorderSpacing.Bottom при возникновении события сохранения файла/проекта, компиляции проекта, переключения из редактора формы в редактор кода. Так как могут возникнуть непредвиденные проблемы данная опция может быть выключена в настройках.

Tested in Lazarus 2.2.0 (rev lazarus_2_2_0) FPC 3.2.2 x86_64-win64-win32/win64 on Windows 10 x64 and Windows 7 x32.

jcmontherock:
Very nice. Thank you.  :O)

JuhaManninen:
Can you please fork the Lazarus sources in GitLab and apply your improvements to DockedFormEditor, preferably one improvement per commit.

K155LA3:

--- Quote from: JuhaManninen on February 20, 2022, 10:10:05 am ---Can you please fork the Lazarus sources in GitLab and apply your improvements to DockedFormEditor, preferably one improvement per commit.
--- End quote ---
I will try. But first, I propose to integrate all these improvements to the current version of DockedFormEditor and lay out in this topic for testing. After all, more than a year has passed since the version of DockedFormEeditor in which these changes are made.
And also I will try to note the sections of the code so that it is easier to add one by one improvement per commit.
I propose to divide improvements to the following steps:
1. Add a form header, as it is associated with the change in the location of the panels (including the main menu panel) in ResizeFrame.
2. Add the implementation of the main menu.
3. Add the implementation of the "smart" position of StatusBar.
4. Add the implementation of the selection of the form position on the desktop.

wp:
Please make the form header optional. The designer form is often too small and requires scrolling; adding a title bar makes it even smaller.

Navigation

[0] Message Index

[#] Next page

Go to full version