Jump to content

Recommended Posts

Posted

Hello,

 

I have 2 images left aligned and client aligned.

When I change left image (with AutoSize to true) I need to resize Main Form or browser to do that these images be aligned correctly.

 

How can I force it via code.

 

Regards

  • 2 weeks later...
Posted

Sorry, but ReCalculateAligns where is declarated ?

 

Sorry KingOrmon, I have copied a code from a frame.

 

Try it on MainForm for example:

 

Self.WebForm.ReCalculateAligns;

 

 

Regards.

  • 2 weeks later...
Posted

KingOrmon,

 

This is not the best way to solve this, but while Mr. Farshad don´t indicate the best solution you can try this to force resize again:

 

procedure TMainForm.UniBitBtn1Click(Sender: TObject);
begin
 UniImage3.Picture.LoadFromFile(GetModulePath(HInstance)+'\SunSet.png');

 Width := Width + 1;
 Width := Width - 1;
end;

 

 

Hello,

 

I attach a simple case, thank you.

 

Steps for reproduce:

 

1. Change image3 via button open

2. You will see that autosize is not triggered. Only when you resize form manually.

  • Administrators
Posted

This may help:

 

procedure TMainForm.UniBitBtn1Click(Sender: TObject);
begin
 UniImage3.Picture.LoadFromFile(GetModulePath(HInstance)+'\SunSet.png');
 UniImage3.Width:=UniImage3.Picture.Width;
 UniImage3.Height:=UniImage3.Picture.Height;
 UniPanel1.ReCalculateAligns;
end;

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...