Jump to content

Recommended Posts

Posted

Hi,

 

I have a panel where i place some diferent frames depending of a button click.

 

When i assign the frame align to "alclient", it doesn't do it, it's placed but not maximized to the size of the panel. 

 

This is the code i run on a click button of my Form form 1 of the frames:

if frame1 = nil then begin
        frame1:= tframe1.create(self);
        frame1.Parent := self.panel1;
        frame1.Align := alclient;
        frame1.Visible := true;
end;
if frame1 <> nil then begin
        frame1.init(self.Handle,nil,nil);
        self.frame1.BringToFront;
        self.Menu:=self.frame1.Menu;
end;

frame1 is a private variable of the form and self.panel1 is alclient to this form.

 

Also, as i mentioned in another post, self.Menu:=self.frame1.Menu doesn't work. You can't change the menu of a Form based on the active Frame as you can do in Delphi.

 

 

Thank you very much

  • 11 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...