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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...