Difference between revisions of "DockedFormEditor/ru"

From Free Pascal wiki
Jump to navigationJump to search
Line 15: Line 15:
 
* Теперь пересоберите Lazarus IDE.
 
* Теперь пересоберите Lazarus IDE.
  
= Layout =
+
= Макет =
  
After installation there are the design tabs docked next to source editor unit:
+
После установки рядом с модулем редактора исходного кода появятся закрепленные вкладки дизайнера:
  
 
[[Image:DockedLayout1.png]]
 
[[Image:DockedLayout1.png]]

Revision as of 21:00, 17 May 2021

English (en) русский (ru)

DockedFormEditor - это пакет для Lazarus IDE, который закрепляет форму рядом с модулем редактора исходного кода. Этот пакет поставляется с Lazarus версии 2.1 и выше.

Почему это полезно?

Если вам не нравится искать форму, относящуюся к объекту, вы можете переключиться на страницах редактора исходного кода. Там вы найдете форму, закрепленную как вкладку. Полезно - это комбинация пакетов AnchorDockingDsgn с DockedFormEditor, если вам не нравится внешний вид «отдельных окон» по умолчанию в Lazarus IDE и вы предпочитаете одно окно.

DockedFormEditor является заменой и изначально ответвленной формой Sparta_DockedFormEditor. Если вы использовали этот пакет в прошлом, переключитесь на DockedFormEditor, поскольку все пакеты Sparta теперь определены как устаревшие и будут удалены в будущей версии Lazarus.

Установка

  • Удалите любые другие диспетчеры стыковки (например, easydockmgrdsgn) и особенно Sparta_DockedFormEditor!
  • Установите этот пакет (и, возможно, AnchorDockingDsgn) в главное меню - MainMenu -> Package -> Install/Uninstall Packages... -> отметьте dockedformeditor.
  • Теперь пересоберите Lazarus IDE.

Макет

После установки рядом с модулем редактора исходного кода появятся закрепленные вкладки дизайнера:

DockedLayout1.png

Pages

Code

In the tab Code is the source editor, where you can implement the logic of your app.

DockedCode.png

Form

In the tab Form is the default form designer. Without this package it is a separate window.

DockedForm.png

Anchors

In the tab Anchors is a optional anchor designer. It's follows the WYSIWYG concept and your form react at runtime same as in designtime. It can be used simultaneously with default Anchor Editor:

  • You can snap a control border or point with the grips and anchor it to a next or parent control.
  • Sizing or positioning without anchoring are possible with mouse.
  • With <Ctrl> + mouse you can change the border around a control.
  • Constraints of a control are noted.
  • Per popup menu a control can simply fixed on paranet or this fixing can be removed.
  • All properties affected per Anchor Designer are shown in hint of control.

DockedAnchors.png

Options

There are some options, found after package installation, under MainMenu -> Tools -> Options ... -> Docked Form Editor. Next to some color definitions you find:

  • Tab position: defines the position of the tabs Code, Form, Anchors
  • Force Refreshing At Sizing: if the resizing eats to much time, this option can be deactivated
  • Capture Distance: this is the minimal distance in pixel to catch a control with mouse
  • Automatically treat Alings properties: the Anchor Designer can only work with Anchors, so Aligns are translated to Anchors when this option is activated
  • Automatically treat BorderSpacing properties: allow Anchor designer to change all Borderings (Around, Left, Top, Right, Bottom) to fit in
  • Allow size changing: you can change the size of a control or you can really only set or remove Anchors and BorderSpacing

Limits

  • Tested on Windows7, 10, Linux Mint Cinnamon with GTK2, QT4, QT5.

Known Issues

  • When designed 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 designer
  • 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 Issue #38701
  • Form designer shows ghost selectors "grab points" when option "reduced designer painting" is NOT active, see Issue #33781

Links