4
votes

How I can create a custom shape changing dialog form in Firemonkey using Delphi XE3.

I want create two layout with some components(buttons,edits) inside any one of them, and one button in the first layout with name "SHOW/HIDE MORE DETAILS ", So this button will do: layout2.visible:=false

With this layout2 component hide but not auto align and auto size form. How i can doit? Here image example about what i want to do

Image Example

2
I'm having a hard time figuring out what you are trying to accomplish. Could you explain with more detail?Peter
@PeterVonča I only want create a single shape dialog form like as this files.itslearning.com/data/764/2405/qt4/images/sort1.jpg with click on more form autoresize and layout2 appear.David A
Please don't put tag information in your title. The tagging system here is very good at classifying things, and doesn't need help. :-) Please see Should questions include "tags" in their titles?. Thanks.Ken White

2 Answers

5
votes

Look at the following code:

procedure TForm1.Button1Click(Sender: TObject);
begin
  Form1.Height:=40;
end; 

Using this, when you click More (in this case the button is called Button1) the form changes its height. I set 40, but of course you can use another integer value.

4
votes

Simply control the Forms Height Property to expand or contract the form. Any control that is not being painted in the client area still remains in the same position regardless.

Make sure that you disable your none-visible components when contracting the form, despite not being drawn they can still receive focus.