B
B
Blunker2016-06-18 18:53:17
Delphi
Blunker, 2016-06-18 18:53:17

How to change form content?

There is a small project on Delphi 7. Its essence is that when a button is pressed, the contents of the window should change.
For example, I select click on the button, and 3 other buttons appear

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
kalapanga, 2016-06-19
@kalapanga

For such a task, TPageControl is well suited. Each form state on its own tab. It will not be necessary to change the visibility of a bunch of controls - just switch the tabs. And there will be no porridge from controls in the design. Hide tabs on tabs.

A
Andrey Golubkov, 2016-06-18
@Android97

You can make a GroupBox or Panel, add components there. Next, you specify GroupBox.Visible = false
When you click on the button, write GroupBox.Visible=true

I
instigator21, 2016-06-23
@instigator21

var
  Button : TButton;
begin
  Button := TButton.Create(Self);
  Button.Parent := pnlBottom;
  Button.Caption := 'Some caption';
  Button.Left := 600;
end;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question