Jump to content

Possible Auto Resize component? screen size (1366,1024) etc


Ulugbek

Recommended Posts

i have no problem with 1024 + 768 ...

 

in Mainform / OnScreenResize i have:

procedure TMainForm.UniFormScreenResize(Sender: TObject; AWidth,
  AHeight: Integer);
begin
sende_resizing;
end;

in "send_resizing":

procedure TMainForm.sende_resizing;
begin
unimainmodule.raufscrollen_panel_position:=raufscrollen_panel.Top;


if unimainmodule.aktueller_menupunkt='tmodul001_frame_detail1' then
begin
(FCurrentFrame1 as tmodul001_frame_header1).resizing;
(FCurrentFrame3 as tmodul001_frame_detail1).resizing;
end;


if unimainmodule.aktueller_menupunkt='tmodul001_frame_detail2' then
(FCurrentFrame3 as tmodul001_frame_detail2).resizing;


if unimainmodule.aktueller_menupunkt='tmodul001_frame_detail3' then
(FCurrentFrame3 as tmodul001_frame_detail3).resizing;


if unimainmodule.aktueller_menupunkt='tmodul001_frame_detail4' then
(FCurrentFrame3 as tmodul001_frame_detail4).resizing;
end;

.. i send the "resize Information" to all Frames ...

 

in Frame:

    public
    procedure resizing;
 
procedure Tmodul001_frame_detail1.resizing;
var i:Integer;
begin




    for i:=0 to self.ComponentCount-1 do
      begin
       if self.Components[i].ClassName= 'TUniPanel' then
           begin
           if (self.Components[i] as TUniPanel).Tag = 1 then (self.Components[i] as TUniPanel).Color:=  or position or something you need
             ...
           end;
      end;

... so every component is shown like i want ..

i use tag-values of components to differentiate the color or position/size ..

 

 

Hope that helps

 

 

 

 

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...