can not use attribute Stretch in version 12.1.0 |
Post Reply |
Author | |
rienzi
Groupie Joined: 20 August 2009 Status: Offline Points: 38 |
Post Options
Thanks(0)
Posted: 16 December 2009 at 5:05am |
i can not use attribute Stretch in tag Image in XAML snippet in a CXTPButton object, the XAML snippet is:
<Image Source='file://c:\\1.jpg' Stretch='Fill' \>
the Xtreme lib version is 12.1.0
if I do not use Stretch attribute, the snippet works well
does this version support Stretch attribute in tag Image?
tell me please big master
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
To Stretch it you need specify Width and Height of Image,
<Image Height='10' Width='20' Source='file://c:\\1.jpg' Stretch='Fill' \>
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
rienzi
Groupie Joined: 20 August 2009 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
but the snippet still can not work well when the Height and Width attributes have been added, the XAML snippet is <Image Height='10' Width='20' Source='file://c:\\1.jpg' Stretch='Fill' />
if i delete the Stretch='Fill' part, the tag works well,
when that part is added, the entire XAML will be displayed as pure text on the CXTPButton,
in fact, i just wanna reduce the size of 1.jpg and display it on the CXTPButton control, smaller size without Stretch attribute can only show part of the jpg picture, i wanna show the whole jpg picture as a smaller size.
what can i do, tell me please big master |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Just checked - Stretch was added in 12.1.1 release :-(
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
rienzi
Groupie Joined: 20 August 2009 Status: Offline Points: 38 |
Post Options
Thanks(0)
|
OK, I know now.
Thank you very much my big master
|
|
Krog
Groupie Joined: 06 February 2008 Status: Offline Points: 100 |
Post Options
Thanks(0)
|
I have a suggestion.
I have the need to have an attribute value for Stretch that works like this: If the image size is smaller than or equal to the image element size, the image is NOT stretched. If the image size is BIGGER than the image element, then it is stretched to be reduced. Actually I am using code to implement it:
But sometimes we cannot do it, as when using markup. And there are times where only the height or width of the element is fixed. In these cases the Stretch function may do the comparisons only for this fixed size. Thanks in advance! |
|
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows XP SP2 Language: Visual Basic 6 SP6 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Afraid I need some test project to see what you mean.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Krog
Groupie Joined: 06 February 2008 Status: Offline Points: 100 |
Post Options
Thanks(0)
|
Hi Oleg! Happy New Year!
Suppose that we have a markup label that has only an Image element on it, like this: <Image Source='101' Stretch='Something'/> And that the markup label has a size of 100x100 pixels (square). I need to have the following behavior for Stretch: If the image to be shown in the element has a small size (e.g. 50x80) then it does not need to be stretched. But if the image is greater than the element size (e.g. 120x110) then the control would stretch the image so we can see all of it, redimensioned of course. And if only one size of the image is greater (e.g. 120x80) then the image would be stretched also, but preserving its native aspect ratio. I tried the 4 Stretch values (None, Fill, Uniform, UniformToFill) but no one does it. Here is a sample: 20100105_092742_StretchTest.rar In the test project the only attribute value that does not stretch a small image is 'None'... And I need one that stretch only the big images, but not the small ones. By the way, the installers are not creating the links for 2 files on the Documentation folder: "Symbol Reference" and "Markup Guide". Regards! |
|
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows XP SP2 Language: Visual Basic 6 SP6 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
FWIW, I agree that this would be a nice feature - maybe Stretch='ShrinkUniform'? The image will only be shrunk (with aspect ratio preservation) if its width or height are greater than the containing element's width/height.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Krog
Groupie Joined: 06 February 2008 Status: Offline Points: 100 |
Post Options
Thanks(0)
|
Hi all!
Here is a new suggestion: To use the Lanczos3 filter to do the stretch of images. The reason is that the actual stretch is showing the images with a not so clear resolution. I am showing images of products on the product base, photos of customers on the customers base, etc. and the photos and pictures when stretched are not so good, compared to the same image redimensioned on IrfanView using the Lanczos3 filter. With Regards! |
|
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows XP SP2 Language: Visual Basic 6 SP6 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |