KingOrmon Posted June 29, 2012 Posted June 29, 2012 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 Quote
dieger Posted July 11, 2012 Posted July 11, 2012 any idea ? Try, Self.FormRegion.ReCalculateAligns; Quote
KingOrmon Posted July 11, 2012 Author Posted July 11, 2012 Sorry, but ReCalculateAligns where is declarated ? Quote
dieger Posted July 11, 2012 Posted July 11, 2012 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. Quote
KingOrmon Posted July 11, 2012 Author Posted July 11, 2012 Sorry, but it does not work. It only resizes when I manually resize browser then all images are autosized and well aligned. Quote
Administrators Farshad Mohajeri Posted July 21, 2012 Administrators Posted July 21, 2012 Send a simple test case please. Quote
KingOrmon Posted July 22, 2012 Author Posted July 22, 2012 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. UniGui1.rar Quote
dieger Posted July 23, 2012 Posted July 23, 2012 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. Quote
Administrators Farshad Mohajeri Posted July 23, 2012 Administrators Posted July 23, 2012 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; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.