Recent

Author Topic: [Solved] How to move icons together at design time.  (Read 548 times)

loaded

  • Sr. Member
  • ****
  • Posts: 315
[Solved] How to move icons together at design time.
« on: September 20, 2021, 10:14:04 am »
Hi All,
Is it possible for the datasource icon to move with the button icon during the design phase?
« Last Edit: September 20, 2021, 12:19:41 pm by loaded »
Lazarus V2.0.10 32 Bit + Intel I5 8250U + 12GB RAM + Win 10 Home 64 Bit = red pill
Morpheus: "You take the blue pill...the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill...you stay in Wonderland, and I show you how deep the rabbit hole goes."

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3972
  • I like bugs.
Re: How to move icons together at design time.
« Reply #1 on: September 20, 2021, 10:27:55 am »
Is it possible for the datasource icon to move with the button icon during the design phase?
You must select them both using mouse Shift-click, then move.
Anchors cannot be used with non-visual components.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

loaded

  • Sr. Member
  • ****
  • Posts: 315
Re: How to move icons together at design time.
« Reply #2 on: September 20, 2021, 10:33:15 am »
First of all thank you very much for your reply, Master JuhaManninen.
Yes if I use the shift key they move together. If I want this move to be permanent, is there anything else I can do?
Because I have more than one button and data source, it is a little troublesome to use the shift key every time.
What I mean is actually assigning the button as the ancestor of the datasource so that when I just move the button, the datasource will travel with it.
Lazarus V2.0.10 32 Bit + Intel I5 8250U + 12GB RAM + Win 10 Home 64 Bit = red pill
Morpheus: "You take the blue pill...the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill...you stay in Wonderland, and I show you how deep the rabbit hole goes."

MarkMLl

  • Hero Member
  • *****
  • Posts: 3269
Re: How to move icons together at design time.
« Reply #3 on: September 20, 2021, 10:42:08 am »
First of all thank you very much for your reply, Master JuhaManninen.
Yes if I use the shift key they move together. If I want this move to be permanent, is there anything else I can do?
Because I have more than one button and data source, it is a little troublesome to use the shift key every time.
What I mean is actually assigning the button as the ancestor of the datasource so that when I just move the button, the datasource will travel with it.

So what you're effectively looking for is a way of doing design-time grouping, like you can group elements in a vector drawing program (Inkscape, a CAD program etc.).

I'd suggest that this is closely related to being able to lock design-time layout, and my understanding is that neither is well supported by the IDE: the closest you'll get is by using a frame for visual components or a datamodule for non-visual components.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

loaded

  • Sr. Member
  • ****
  • Posts: 315
Re: How to move icons together at design time.
« Reply #4 on: September 20, 2021, 10:50:44 am »
MarkMLI, Thank you very much for taking your precious time to reply. At least I realized I wasn't on the wrong track. Thanks.
Lazarus V2.0.10 32 Bit + Intel I5 8250U + 12GB RAM + Win 10 Home 64 Bit = red pill
Morpheus: "You take the blue pill...the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill...you stay in Wonderland, and I show you how deep the rabbit hole goes."

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3972
  • I like bugs.
Re: How to move icons together at design time.
« Reply #5 on: September 20, 2021, 11:26:10 am »
Yes, Datamodule may be the best choice. A form becomes messy quickly when you put many non-visual components there.
Name the components on a Datamodule logically so they can easily be associated with controls (Buttons etc.) on the form.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

loaded

  • Sr. Member
  • ****
  • Posts: 315
Re: How to move icons together at design time.
« Reply #6 on: September 20, 2021, 12:19:27 pm »
I'm sorry I couldn't understand you MarkMLl because of my poor English.
When Master JuhaManninen talked about the DataModule, I understood very well what you meant.
When the issue is understood; It was like a light in the dark.  :o
Thank you both so much for teaching me something I didn't know.
Lazarus V2.0.10 32 Bit + Intel I5 8250U + 12GB RAM + Win 10 Home 64 Bit = red pill
Morpheus: "You take the blue pill...the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill...you stay in Wonderland, and I show you how deep the rabbit hole goes."

 

TinyPortal © 2005-2018