Recent

Author Topic: How to duplicate the visual object  (Read 339 times)

Nera

  • New Member
  • *
  • Posts: 43
How to duplicate the visual object
« on: January 28, 2020, 10:43:55 am »
Hi,

I don't want to clone, I want to duplicate, that is, make a new visual object.

For example. I have buttons from 1 to 5. When I copy, I will create buttons from 6 to 10.

Thanks
« Last Edit: January 28, 2020, 10:49:29 am by Nera »

howardpc

  • Hero Member
  • *****
  • Posts: 3313
Re: How to duplicate the visual object
« Reply #1 on: January 28, 2020, 10:54:08 am »
You don't make clear how you distinguish a "cloned" object from a "duplicated" object.
Will the new object have properties with identical values to some other object?
To create a new object you simply write
Code: Pascal  [Select]
  1.   newVisualObject := TVisualObject.Create(...);

Nera

  • New Member
  • *
  • Posts: 43
Re: How to duplicate the visual object
« Reply #2 on: January 28, 2020, 10:57:59 am »
You don't make clear how you distinguish a "cloned" object from a "duplicated" object.
Will the new object have properties with identical values to some other object?
To create a new object you simply write
Code: Pascal  [Select]
  1.   newVisualObject := TVisualObject.Create(...);


I want to create a visual object like a Tbutton or Tedit. Which key should I hold down to copy an object and make a new object.

howardpc

  • Hero Member
  • *****
  • Posts: 3313
Re: How to duplicate the visual object
« Reply #3 on: January 28, 2020, 11:17:54 am »
In the Lazarus IDE you click the edit or button icon in the Component Palette and drop it on your form.

egsuh

  • Sr. Member
  • ****
  • Posts: 276
Re: How to duplicate the visual object
« Reply #4 on: January 28, 2020, 01:14:25 pm »
Ctrl-C and Ctrl-V.

Nera

  • New Member
  • *
  • Posts: 43
Re: How to duplicate the visual object
« Reply #5 on: January 28, 2020, 06:32:04 pm »
Thanks :D