I think you'll want to set the scaleX and scaleY of the image based on the difference between the VBox's base size and its current size.
Image has a facility to scale images down to fit, but not up, so this might be your best bet. --- In [email protected], "Charu" <[EMAIL PROTECTED]> wrote: > > Hello All, > > i am creating a component where one i have a vbox and under that i have > an image. > > i have provided the faciltity to load image at runtime by specifing the > url. > one can also change it's height and width at runtime.Along with stretch > options(by height,width,both) > > So can ne1 help me how to compress the image width or height according > to the height of vbox. > like if i specify stretch by height it should be stretched from it'e > height... > > please help ...quite urgent >

