Lazarus

Using the Lazarus IDE => Designer => Topic started by: loaded on September 20, 2021, 10:14:04 am

Title: [Solved] How to move icons together at design time.
Post by: loaded 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?
Title: Re: How to move icons together at design time.
Post by: JuhaManninen 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.
Title: Re: How to move icons together at design time.
Post by: loaded 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.
Title: Re: How to move icons together at design time.
Post by: MarkMLl 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
Title: Re: How to move icons together at design time.
Post by: loaded 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.
Title: Re: How to move icons together at design time.
Post by: JuhaManninen 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.
Title: Re: How to move icons together at design time.
Post by: loaded 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.
TinyPortal © 2005-2018