5

With 10 years of experience in development, I could not put new buttons on the Toolbar FireMonkey. Could anyone help me?

Rob Kennedy
  • 161,384
  • 21
  • 275
  • 467
EversonNovka
  • 181
  • 2
  • 6

2 Answers2

5

There is no component editor menu-item to add buttons or seperators, but you can drag buttons from the toolpallet to the toolbar. Or select the toolbar in the form and press F6. Type the name of the control you want on the toolbar and press enter.

Arjen van der Spek
  • 2,630
  • 16
  • 20
  • I did this, but I understood that the object did not receive the parent of the toolbar. Seeing the fmx file, it actually receives the parent. Thank you! – EversonNovka Oct 26 '11 at 17:02
  • Use the structure window for locating controls or to move them to a different parent. It is possible that a control is outside the form or other control. In that case inspect the top/left position in the object inspector. – Arjen van der Spek Oct 26 '11 at 18:52
  • Very interesting this FireMonkey. Thanks for the help. – EversonNovka Jan 06 '12 at 19:04
4

TToolBar is now simply a container. You must drop your own controls onto it.

To add a control to a ToolBar, make sure that your ToolBar is selected on the form, select your child control in the Tool Palette, and then click the location in the ToolBar that you wish your child control to appear.

Another way to do this is to ensure that the ToolBar is selected and double-click the control in the Tool Palette. Whatever control is selected becomes the parent.

Many of the new FireMonkey UI controls are now simply containers, including TStatusBar.

To add a text line to TStatusBar, you must add your own TLabel or other control.

I found that the best way to put an image on a button was to literally drop a TImage onto the button and unset the TImage's HitTest property.

All FireMonkey controls are containers and can have child controls now. It might take a little longer to configure your UI, but you have a lot of flexibility.

Use the TLayout control for dividing up the parent control and aligning your controls. Use the Margin and Padding properties to adjust the spacing.

naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259
Marcus Adams
  • 53,009
  • 9
  • 91
  • 143