

(We design ours as frames and client-align a frame to the dockable panel.) Are meant to hold complex controls, including standard VCL controls - they're meant as a toolbar and docking system-compatible way to build complex docked forms.Are designed to shrink: a form can get too small or a user can drag a toolbar over another, and a toolbar will show only the items it can, and either hide the others or show a chevron (a tiny > button to open a menu containing the other items.).They also often sit in several rows, and the one dock expands and contains several rows. Stack: as well as having any amount of space between them (unlike docked panels, which always sit adjacent to each other) toolbars can have space between them they sit whereever the user put them.Are meant to contain SpTBX items (buttons, dropdown, etc, not any normal VCL controls, buttons, etc) and can dynamically change from being toolbars to menus etc, eg as the form is resized and the toolbar shrinks.The reason for this is guesswork, but I would guess it's because of the different behaviour of the two docked controls and their purpose. A toolbar can dock into a dock, and a dockable panel can dock into a multidock. Nor can you dock a TSpTBXDockablePanel on a TSpTBXDock. I'm stepping into remembered territory here and I can't guarantee that this part of the answer is correct, because I converted our app from TBX to SpTBX a long, long time ago.įirst of all, no, you cannot place a TSpTBXToolbar on a dockable panel. "Can I place toolbars on a TSpTbxMultiDock?" Luckily, both these lead to your second question. My guess is you are asking this because you're struggling with a TBX -> SpTBX migration and you want docking areas which can handle both toolbars and dockable panels. I feel I've given a correct answer but not a helpful answer (the above are technical reasons, not conceptual reasons), which requires insight into what you're doing. I'm not quite sure I've answered your question. It also updates the total so the panel knows how big is has to be, or can be if it chooses. That is, for a horizontal panel it is the left / horizontal start, and for a vertical panel it is the top / vertical start. But this method gets a list of all docked panels and updates each one's DockPos, which is the one-dimensional position of the dock in the panel.

#Linux multidock code
The easiest way to do this is to constrain the type of the controls it can dock to descendants of a specific class which declares and implements the required interface (using interface loosely, there is no (class) interface declared, it's just an informal set of methods / properties.)įrom scanning the code quickly, I think only the first of these, UpdateDockablePanelsDockPos, is really essential. In other words, the docking and layout code needs to know certain information and ask the docked controls to do certain things. See TSpTBXCustomDockablePanel.SetParent, which looks after this: it accesses the properties and methods TSpTBXCustomMultiDock. The long answer is that the TSpTBXMultiDock component is written to handle and dock only TSpTBXDockablePanels because the docking code relies on specific methods / properties in the controls it is docking. The short answer is, because the TSpTBXMultiDock component is written to handle and dock only TSpTBXDockablePanels. "I need to use TSpTbxMultiDock instead for panels? Why?"

Raise EInvalidOperation.CreateFmt('Cannot insert %s into %s. If (AComponent is TTBDock) and not (AComponent is TSpTBXCustomMultiDock) then Procedure TSpTBXCustomDockablePanel.ValidateContainer(AComponent: TComponent) Raise EInvalidOperation.CreateFmt('Cannot insert %s into MultiDock', ) If not (AComponent is TSpTBXCustomDockablePanel) then why such code is written: procedure TSpTBXCustomMultiDock.ValidateInsert(AComponent: TComponent) Can I place toolbars on a TSpTbxMultiDock instead of a TSpTBXDock?.

Do I need to use a TSpTbxMultiDock instead for panels? Why?.I see a runtime error message saying I can't place a panel on a dock. After moving TBX->SpTBX I can't place a panel ( TSpTbxDockablePanel) on a TSpTbxDock. In my current project I have a TTbxDock with toolbars and panels ( TTbxDockablePanel).
