PDA

View Full Version : How to save different forms and use it in the runtime?



azrael11
07-01-2011, 07:57 AM
How can i save different forms or panels inside the forms and call in run time?

My project need wants to many different forms and components.
I want to have three panels.
In one of this panels i want to load the componets and place it in the giving position and size.

Something like this .

When i click the "settings" button from panel2 in the panel 3 appears the 15 components in their position and size.
When i click the "screen" button from panel2 in the panel 3 disappears the previous components and appears the new 12 components..

Thank you...

WILL
07-01-2011, 12:54 PM
I assume that you are talking about either Delphi or Lazarus' components?

azrael11
07-01-2011, 01:42 PM
I assume that you are talking about either Delphi or Lazarus' components?

Delphi for start and Lazarus second :)

Brainer
07-01-2011, 05:32 PM
Hi!
Have you checked this one out already?
http://www.delphi3000.com/articles/article_2969.asp?SK=

azrael11
08-01-2011, 10:02 AM
Hi!
Have you checked this one out already?
http://www.delphi3000.com/articles/article_2969.asp?SK=

Ouaou i never Know that is so compicated?
Thanks brainer

Do have something else to propose me ... ?
One panel different choises and different components from choises ?

Thank you...

Brainer
08-01-2011, 10:15 AM
If I understood your first post well, you are trying to make some kind of the Ribbon control, am I right? Well, maybe I didn't say precisely what I mean, but basically: you want to change components depending on what options the user selects. Yea - that sounds more like your question. Anyway, have you looked into frames? Here's a link to a video explaining how to use them in Delphi: http://www.youtube.com/watch?v=pWK-SYpYn4Y. The audio is in Italian, I guess, but there's nothing to understand from what the guy's talking. Just watch the video. :)

Alternatively, you can build your app using TTabControl and hide the tabs - I believe there's a property of the TTabControl component to do so. :)

azrael11
08-01-2011, 03:38 PM
If I understood your first post well, you are trying to make some kind of the Ribbon control, am I right? Well, maybe I didn't say precisely what I mean, but basically: you want to change components depending on what options the user selects. Yea - that sounds more like your question. Anyway, have you looked into frames? Here's a link to a video explaining how to use them in Delphi: http://www.youtube.com/watch?v=pWK-SYpYn4Y. The audio is in Italian, I guess, but there's nothing to understand from what the guy's talking. Just watch the video. :)

Alternatively, you can build your app using TTabControl and hide the tabs - I believe there's a property of the TTabControl component to do so. :)

Frames ha ... this is very close to that i am thinking for.

Thanks again brainer...

User137
08-01-2011, 03:40 PM
As far as creating components go, you can simply:

with TPanel.create(form1) do begin
left:=10;
top:=10;
width:=200;
height:=100;
caption:='';
end;
and so on...

Brainer
08-01-2011, 10:09 PM
Frames ha ... this is very close to that i am thinking for.
Hm, then please elaborate more. :)

WILL
08-01-2011, 11:36 PM
You could also create your own code to manipulate a set of basic VCL/LCL components to be resized based on the size of the form or panel they reside in. Then it's all in the math you use and applying new size values to width and height of each of the components in your structure you built inside.

If none of this is helping perhaps you can instead upload a basic drawing or diagram which helps to explain visually what it is that you are trying to do.

azrael11
09-01-2011, 06:26 AM
You could also create your own code to manipulate a set of basic VCL/LCL components to be resized based on the size of the form or panel they reside in. Then it's all in the math you use and applying new size values to width and height of each of the components in your structure you built inside.

If none of this is helping perhaps you can instead upload a basic drawing or diagram which helps to explain visually what it is that you are trying to do.

"Will" this is my first thought so i start coding...
In the middle i relize that i have to much code to manipulate and very hard "for me" to degguging...

The hole idea is that this program is a config setting for another program but is has to many parametres...
So i need links, each of them with many different components so the end user not comfuzed...

Thank you all... for the help.

p.s. i have done a little work when it become more stable i post it here for critisism ;)...
Sorry for my bad english...