I have made extensive use of inherited forms in an application and am looking to use frames to individualise some aspects of the interface.
I am new to frames and with a simple test program to see how they work, my test frame did not appear on the form.
I did the following:
I created a new Form and added a button.
I then created a Frame with a different colour to the Form, and some labels (ie something to see).
I declared the frame as a variable on the form i.e
I then put the following code behind the Onclick event of the button I placed on the form
if Frame1 = nil then
Frame1 := TFrame.Create(self);
Frame1.Visible := true;
Frame1.Align := alTop;
Frame1.Parent := Form1;
I have also used
When I run the program, and click the button, I can't see the frame. However, if I leave some extraneous labels on the form where the frame it to appear, these disappear when I click the button ie, the frame is there in some spiritual form, but I can't see it. What else do I need to do?
I expect this is an easy question for the gurus, but it is worth 200 points (not 50) to me.