Jump to content
uniGUI Discussion Forums
Sign in to follow this  
t4ufiq

How to fit image

Recommended Posts

ide01.thumb.jpg.8acabddbdfe768c3f9623dc6dfccad71.jpg

on IDE it look all work like what i want, UniImage show everything. UniImage property: center, proportional, and stretch set to true

but when we run it and open on browser. UniImane fit the image height only, the image width is cropped

browser01.thumb.jpg.03235e451c316d2188c413129c9e22bf.jpg

how to make it appeared fit and proportionally like shown on IDE ??

 

Share this post


Link to post
Share on other sites

Hello, 

Which build, browser are you using? 

Can you make a simple testcase for this? 

Share this post


Link to post
Share on other sites
1 hour ago, Sherzod said:

Hello, 

Which build, browser are you using? 

Can you make a simple testcase for this? 

im using latest build 1.70.0.1485

simple test here : http://45.127.134.106:8077/

additional code only on each checkbox

Quote

procedure TMainForm.UniCheckBox1Change(Sender: TObject);
begin
  if UniCheckBox1.Checked then
    UniImage1.Center:=true
  else
    UniImage1.Center:=false;
end;

procedure TMainForm.UniCheckBox2Change(Sender: TObject);
begin
if UniCheckBox2.Checked then
    UniImage1.Proportional:=true
  else
    UniImage1.Proportional:=false;
end;

procedure TMainForm.UniCheckBox3Change(Sender: TObject);
begin
   if UniCheckBox3.Checked then
    UniImage1.Stretch:=true
  else
    UniImage1.Stretch:=false;
end;

 

Share this post


Link to post
Share on other sites
2 hours ago, t4ufiq said:

additional code only on each checkbox

Quote

So, do you mean in runtime?

Share this post


Link to post
Share on other sites
14 minutes ago, t4ufiq said:

runtime or not, never show result like this:

Sorry, what do you think it should look like ?!

Share this post


Link to post
Share on other sites

If Center=True, Proportional=True then on your screen everything is fine I think

Share this post


Link to post
Share on other sites

i found what cause it. its parent container set to "uniAlignmentClient"

when i set set to "uniAlignmentServer" ,  it show stretched very well

maybe you can reproduce the case .. :)

thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×