Recent

Author Topic: Copying a control to the toolbar for temporary selection.  (Read 622 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1087
    • HowTos Considered Harmful?
Copying a control to the toolbar for temporary selection.
« on: September 01, 2024, 04:04:57 pm »
IIRC Delphi has a system where if you need rapid access to a set of one or more grouped controls which may be held in a parent container such as a panel, you can copy it to the components toolbar and select it whenever you want onto a form.

Is that feature available in the Lazarus IDE?

Lazarus 3.0/FPC 3.2.2

dsiders

  • Hero Member
  • *****
  • Posts: 1238
Re: Copying a control to the toolbar for temporary selection.
« Reply #1 on: September 01, 2024, 04:43:22 pm »
IIRC Delphi has a system where if you need rapid access to a set of one or more grouped controls which may be held in a parent container such as a panel, you can copy it to the components toolbar and select it whenever you want onto a form.

Is that feature available in the Lazarus IDE?

Are you referring to TFrame?

https://wiki.freepascal.org/Frames
https://lazarus-ccr.sourceforge.io/docs/lcl/forms/tframe.html


Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

vfclists

  • Hero Member
  • *****
  • Posts: 1087
    • HowTos Considered Harmful?
Re: Copying a control to the toolbar for temporary selection.
« Reply #2 on: September 01, 2024, 09:06:22 pm »
IIRC Delphi has a system where if you need rapid access to a set of one or more grouped controls which may be held in a parent container such as a panel, you can copy it to the components toolbar and select it whenever you want onto a form.

Is that feature available in the Lazarus IDE?

Are you referring to TFrame?

https://wiki.freepascal.org/Frames
https://lazarus-ccr.sourceforge.io/docs/lcl/forms/tframe.html

No, not Tframe. It applies to any control you have made some changes to that you want to make permanently available or just for the session. So for instance of you want a panel with a green border, you can create a panel with a green border, place it on the components palette, and any time you want a panel with a green border you just choose it from the component palette.
Lazarus 3.0/FPC 3.2.2

alpine

  • Hero Member
  • *****
  • Posts: 1263
Re: Copying a control to the toolbar for temporary selection.
« Reply #3 on: September 01, 2024, 10:34:32 pm »
No, not Tframe. It applies to any control you have made some changes to that you want to make permanently available or just for the session. So for instance of you want a panel with a green border, you can create a panel with a green border, place it on the components palette, and any time you want a panel with a green border you just choose it from the component palette.
Doesn't copy/paste do the same thing? :-[
"I'm sorry Dave, I'm afraid I can't do that."
—HAL 9000

Joanna

  • Hero Member
  • *****
  • Posts: 1072
Re: Copying a control to the toolbar for temporary selection.
« Reply #4 on: September 02, 2024, 01:13:35 pm »
Are you trying to create a custom control and add it to the componets palette?
✨ 🙋🏻‍♀️ More Pascal enthusiasts are needed on IRC .. https://libera.chat/guides/ IRC.LIBERA.CHAT  Ports [6667 plaintext ] or [6697 secure] channel #fpc  #pascal Please private Message me if you have any questions or need assistance. 💁🏻‍♀️

dseligo

  • Hero Member
  • *****
  • Posts: 1365
Re: Copying a control to the toolbar for temporary selection.
« Reply #5 on: September 02, 2024, 02:11:49 pm »
No, not Tframe. It applies to any control you have made some changes to that you want to make permanently available or just for the session. So for instance of you want a panel with a green border, you can create a panel with a green border, place it on the components palette, and any time you want a panel with a green border you just choose it from the component palette.
Doesn't copy/paste do the same thing? :-[

It does the same, but this is better. I.e. I *never* use TDBGrid for entering data, so I always adapt it a bit (I set it readonly, just in case, turn off dgIndicator, turn on dgRowSelect and similar). Similar is with some other controls (I always set scrollbars in TMemo). This would allow it to just click it in the components toolbar.

vfclists

  • Hero Member
  • *****
  • Posts: 1087
    • HowTos Considered Harmful?
Re: Copying a control to the toolbar for temporary selection.
« Reply #6 on: September 02, 2024, 10:39:13 pm »
No, not Tframe. It applies to any control you have made some changes to that you want to make permanently available or just for the session. So for instance of you want a panel with a green border, you can create a panel with a green border, place it on the components palette, and any time you want a panel with a green border you just choose it from the component palette.
Doesn't copy/paste do the same thing? :-[

Copy and paste requires that the form with the component is always at hand, meaning it must be common all projects or packages.

This method avoids that.
Lazarus 3.0/FPC 3.2.2

 

TinyPortal © 2005-2018