How to scale a picture (001.jpg) which has its own dimensions to display on a label
dotNetControl dropbtn "System.Windows.Forms.Label" pos:[50,4] width:155 height:121
This code:
dropbtn.image = (dotNetclass "System.Drawing.image").fromfile "d:\folder\001.jpg"
is displaying a portion of the image inside 155x121px
Comments (12)
Comment policy
""
""
thx
It seams .ImageAlign works only with dropbtn.image not with dropbtn.BackgroundImage
But .image does not have ImageLayout property
:(
best way to find out more about .NET using mxs
http://www.scriptspot.com/3ds-max/scripts/show-dotnet-properties
or even more
http://msdn.microsoft.com/en-us/library/k50ex0x9.aspx
OH YESSSS
This is a GREAT Tool to use! I was working just like a stupid without knowing this!
COOOOOOOOOOOOOOL
THX! Its new for me!
I see .ImageAlign
but how to use it?
and .Left
:)
when you find props then you need to go again but with props
end you will end up with this
dropbtn.ImageAlign = dropbtn.ImageAlign.Left
try by yourself this in the listener
I can't remeber if there "align" properties for bgimage but for image is there for sure, you can try to find
position
is it possible to align it to the left?
If I use zoom then it positions it in the center!
Thx barigazy! SOLVED
the only thing is
but your suggestion is WONDERFUL!
BackgroundImageLayout properties : Stretch ; None ; Center ; Zoom ; Tile
dotNetControl dropbtn "System.Windows.Forms.Label" pos:[50,4] width:155 height:121
dropbtn.BackgroundImage = dropbtn.BackgroundImage.fromfile "d:\folder\001.jpg"
dropbtn.BackgroundImageLayout = dropbtn.BackgroundImageLayout.Stretch