I'm asked to add a btn near the TSpTbxDockablePanel's [x] icon. Can I do it? Btn may look like this, note that wider button is better. (I need custom title or icon, and OnClick for it).
Items property of dockable panel allows to add any items TSpTbxItem to caption. Can edit Items while in design mode.
Related
Assume the following situation:
FrmBase has a TPanel named PnlClient, align alClient
FrmDescendant inherits from FrmBase
In FrmDescendant I change a PnlClient property
In FrmDescendant I place another control (say another TPanel named PnlDescendant) on PnlClient and align it alClient.PnlDescendant now completely covers PnlClient
I place lots of other components on PnlDescendant, not necessarily aligned, so I'm afraid to change PnlDescendant (e.g. setting align to alNone and resizing) and lose positions
How can I execute 'revert to inherited' for PnlClient?
There's nothing in the main menu, or in the popup menu for the controls in the Structure View...
Currently using Delphi 10.4.1 Sydney
This is easy for a keyboard user like myself:
Click on PnlDescendant in the form editor to make it the focused and selected control.
Press Esc to select its parent, PnlClient.
Press the Menu key on your keyboard to display the context menu of PnlClient. If you have a cheap keyboard without a Menu key, press Shift+F10 instead.
Click on "Revert to Inherited". (Or, much faster: press the menu item's underlined character, probably I.)
(But notice that this will remove PnlDescendant completely. Probably you didn't want that, but that's how it works.)
I have a TActionToolbar...But there's one "feature" I can't quite figure out how to control.
From the customize dialog (Vcl.CustomizeDlg.TCustomizeDlg) for a TActionToolbar. Note the caption options listbox:
So how exactly do you use selective captions? Right now it appears to be identical to "full" captions, as I can't seem to piece together how you tell Delphi which buttons should display selective captions (or what the selective caption wording should be if it is customizable)
TAction doesn't seem to have any properties that appear to relate to selective captions. The description and examples for TCaption didn't seem to get any hints either.
...Or is this just one of those cases where Delphi is showing some sort of standard windows dialog including features Delphi doesn't actually support?
So how exactly do you use selective captions?
As the same suggests it, it allows to have some buttons showing their caption and some others to don't show it.
Once you've set the action in your toolbar, click on the button. Then go in the inspector and go to the property "ShowCaption" and set it to false. For each button you will do that, the caption will be hidden.
I will try to place a graphic here showing that.
1-click the tool button
2-go to the object inspector
3-see the "ShowCaption" property and set it to "false"
4-then see the result, the first button is now showing its caption
I use that from time to time to gain some space on a toolbar with too much button to hide the caption on some obvious button.
I know that TButton on firemonkey let me add a TPopUp Menu. But it only works when you right click it.
I need make it open right below the button when you do the normal click.
PopupMenu.PopUp(X, Y) is based on the form I believe. How to translate the X,Y of the button (that is deep inside other layouts) to the same coordinate?
And when clicking and the PopUp is shown some weird behavior happens with the selection bar of the popup menu that disappear. The button keeps pressed, that is good.
Look here:
http://blogs.embarcadero.com/sarinadupont/2013/10/17/463/
Is an example for mobile, but you use in desktop too.
How can I make an edit control in fmx transparent and at the same time hide the borders of the control, so it will blend into the control in the back?
What I am trying to do is to make a small Notes program where, when I double-click a tabitem, it shows an edit control to change the text of the tabitem.
Right click the edit control (let's say Edit1) and click 'Edit Custom Style'.
Expand 'edit1style1'.
Click background:TActiveStyleObject.
Clear the SourceLookup property.
With 10 years of experience in development, I could not put new buttons on the Toolbar FireMonkey. Could anyone help me?
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.
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.