I would like to display an image file in it's original size (not to declare the size in code, but to use the size of the image)
the following code
does not display the image at all
I try to use
img.setAutoWidth ();
img.setAutoHeight ();
and the image doesn't appear again.
If I change the code into
(removed the img.setAutoWidth (); img.setAutoHeight ();)
The image comes in the correct height but it is streched in full windows width.
Then...
removing the v.setWidth100 ();
the width of the image is shrinked too mach.
The following code
stretches the image in full windows height, but the width is still shrinked (not right)
How coudl I display the image withoud declaring the size in the code?
Best regards
Yorgos Tryfon
the following code
Code:
public void onModuleLoad () { VLayout v = new VLayout (); v.setIsGroup (true); v.setGroupTitle ("V"); v.setWidth100 (); v.setHeight100 (); v.draw (); Img img = new Img ("sistimikiBanner.png"); img.setAutoFit (true); v.addMember (img); }
I try to use
img.setAutoWidth ();
img.setAutoHeight ();
and the image doesn't appear again.
If I change the code into
Code:
VLayout v = new VLayout (); v.setIsGroup (true); v.setGroupTitle ("V"); v.setWidth100 (); v.setHeight100 (); v.draw (); Img img = new Img ("sistimikiBanner.png"); v.addMember (img); }
The image comes in the correct height but it is streched in full windows width.
Then...
removing the v.setWidth100 ();
the width of the image is shrinked too mach.
The following code
Code:
HLayout h = new HLayout (); h.setIsGroup (true); h.setGroupTitle ("V"); h.setWidth100 (); h.setHeight100 (); h.draw (); Img img3 = new Img ("sistimikiBanner.png"); h.addMember (img3);
How coudl I display the image withoud declaring the size in the code?
Best regards
Yorgos Tryfon
Comment