Hello, I am trying to left align an Image on a form but it ALWAYS shows up on the right. The Code is Form frmLogin = new Form("AMOS Login"); Image img ; try{ img = Image.createImage("/midp/uidemo/anl.png"); frmLogin.append(new ImageItem,"",img,ImageItem.LAYOUT_LEFT,"")); } catch(Exception ex){ frmLogin.append("Cannot Load Image"); } When displayed on the Palm, it looks like the layout is meaning less. The image is on the right all the time. Any ideas how to get it on the RIGHT?? Tx! Bob....
Terence Doyle
Ranch Hand
Joined: May 30, 2001
Posts: 328
posted
0
Hi Bob, This is a quote from the MIDP docs about the Layout:
The value of the layout field is merely a hint. Because of device constraints, such as limited screen size, the implementation may choose to ignore layout directions.
Have you tried with a really small image(2x2 pixels) to see what happens? Bye,
------------------ Terry Doyle Sun Certified Programmer for Java 2 Platform
Raising Flares debut album 'Ignition' out now
http://www.raisingflares.com
Terry Doyle <br />SCPJ 1.4 , SCWCD , SCMAD(Beta)
Ankur Shah
Greenhorn
Joined: Nov 09, 2001
Posts: 10
posted
0
All I want to do is show a rectangle on a form with a textfield and buttons and everything else. I want Text to be displayed within the rectangle as well. How can I do this? What is the code for it? Ankur
Originally posted by Robert Hendry: Hello, I am trying to left align an Image on a form but it ALWAYS shows up on the right. The Code is Form frmLogin = new Form("AMOS Login"); Image img ; try{ img = Image.createImage("/midp/uidemo/anl.png"); frmLogin.append(new ImageItem,"",img,ImageItem.LAYOUT_LEFT,"")); } catch(Exception ex){ frmLogin.append("Cannot Load Image"); } When displayed on the Palm, it looks like the layout is meaning less. The image is on the right all the time. Any ideas how to get it on the RIGHT?? Tx! Bob....