Forum > General

[Solved] How to create control templates.


Hi All,
To also use a map viewer;
For each map; I want to create template with Name, Source, Transparency and Visibility properties and call it layer.
Then I want to display the properties of these layers on the screen.
I can do these manually. But is there a shortcut for this job that I don't know? I wanted to ask you.
Any answer would be greatly appreciated. Respects.

Appendix 1 Layered map view from Paint.Net.
Appendix 2 The template I created for Layer data in Lazarus.

If you employ a TObjectList you can create a class the houses all of the functions needed for each layer; For example the image, plotting data etc..

 The Class will also have another TobjectList where it can a branch from that trunk so that for example you can have many images each having another image from that, too..

 Also, the ObjectList can be instructed to call the constructor as you remove each item.

 I use this in a program where I have overlays after overlays. It works well, you simply need to build that class that manages all the details for each overlay and that could be offset info from each parent object and drawing data.

Thanks a lot for the reply jamie.
I wish you could give a small example, it would be greatly appreciated. Thanks for the idea though.

I looked at your request a little closer and I have some questions.

 1. When you say layer are you referring to actual images over laying each other ?

 2. Are you referring to Hot spots on an image where you can define info as you move your mouse around on a single image?

I am not really sure but to me layers are multiple images on top of each other so I am not sure what your intent is ?

I see what you have for the example you posted and you indicate that you would like a transparency control which tells me that it
 is like a fogging effect to another image or alpha blend.

 Is that what you want? a Stack of images where you can alpha blend them ?

Thanks a lot for the answer jamie, you're 1000 steps above me.
You wrote the situation that I will try to do in the future. But for now I was trying to make a view where I would only show layers as a start. I'll do the events and image processing later.

By the way, an idea came to my mind and I implemented it. The result is very close to the process I want.
Idea; Creating a sample control and duplicating it at runtime.
Sorry the codes might be clumsy.

I would be very grateful if you could review it and write your opinion when it is convenient. Respects.


[0] Message Index

Go to full version