Make a StringItem fit the screen width

Hi,
I�m using a String Item in a Form and I�ve tried to make the Item fit the screen width by using the setPreferredSize(). But if the Text of the String Item is to long, the device still uses a second line to display the end of the text, which I don�t want.
This is how I tried to make my String Item be displayed on an unique line.
iTitleString = new StringItem("title : ","",Item.PLAIN);
int preferedWidth = this.getWidth();
iTitleString.setPreferredSize(preferedWidth,-1);
iTitleString.setText("blablablablablalblablalblalbla");
Thanks for your help

If you mean that it should fit to the screen width by making the font smaller, then you're out of luck. You can try setting a preferred height to avoid multiple lines, but in a best case scenario it would just mean that not all of the text will be displayed.
shmoove

Similar Messages

  • How to make web pages fit the screen width?

    Some web pages don't fit the screen width and Firefox user (me) has to scroll horizontally, which is very annoying:
    https://www.dropbox.com/s/kjyubp6f3z104ku/ScreenShot021.jpg
    Opera user, on the other hand, just clicks on the "Fit to width" button and everything looks great again:
    https://www.dropbox.com/s/hfsgl45f4d7uzgw/ScreenShot023.jpg
    Is there a way to force web page text to wrap?

    I get EXACTALY what "SantosHaHa" posted above. (Ffox 20 Win 7 64).
    Zoom doesn't help. Make things bigger or smaller, BUT THE PAGE WIDTH IS STILL CROPED!
    Have had this problem for 2 years and several versions.
    NOTHING seems to work.
    I wander why Ffox keeps changing versions so often, with so many new problems apearing, if Netscape worked fine 15 years ago!!!!

  • How do I make a page  fit the screen automatically

    How do I make the Safari page fit the screen automatically

    Try keyboard shortcut Control+Command+F (^⌘F)

  • My new version of Firefox (downloaded automatically) on my Mac displays long paragraphs in emails as a single line, so the end of the paragraph is off the screen. How can I make it automatically wrap to fit the screen?

    Long paragraphs in incoming emails display as a single line, with the end of the paragraph running off the screen. I want to make it wrap automatically to fit the screen.

    For the browser window, just drag it to the top left of the screen (click and hold on the top bar with the traffic lights to drag), then in the bottom right of the window you'll see a rectangle with diagonal hatching. Click and hold on that and drag the window to the size you want.
    Clicking on the green dot at top left will expand the window to fit the screen, clicking it again will shrink it back to where it was (this doesn't work in Finder windows quite the same).
    The menu bar size is set in the bowels of the OS, though there may be third-party applications which can alter it.
    As it's size is relative to the screen resolution, you could try reducing the resolution in System Preferences > Displays to see if that would suit you better.

  • Why does IOS 7 enlarge pictures for the wallpaper and then disallow you to make them smaller to fit the screen?

    Why does IOS 7 enlarge pictures for the wallpaper and then disallow you to make them smaller to fit the screen?

    Now correct me if I'm wrong but I am sure I have read that the parallax effect in iOS 7 is the main reason behind wallpapers not being able to be shrunk. However, even disabling the effect will not allow you to resize the pictures like you could in previous versions of iOS, so as Skydiver119 said, it kind of is a glitch. If you are like me, and don't regularly change your wallpaper, then it may be worth creating a photoshop document which is slightly larger than your screen resolution(400px in each direction or so) and then placing your picture to suit, before copying it your device. Obviously, this would not be ideal if you were changing your wallpaper daily or very regularly as it would be a bit of a hassle having to do this every time you wanted to change your wallpaper.
    Hope this Helps!

  • How to Make Video Fit the Screen? (no boxing)

    Hi I have finished my video almost now. However when it is played back in WMV it is like in a letterbox in the middle of the screen. I want to upload it to YouTube so it will look quite small on the screen. Is there a way I can expand it to fit the screen better? There seems to be room both laterally and vertically to expand it. I just looked at the DVD box and it says 16:9 - is this widescreen? not sure. I would appreciate any help. Thank you.
    Rich

    hi i am editing a video and in the importing and the sorce box my video fits the screen but in the box that plays what i am editing it fits as a small box in the center with all this extra space around it and when i exported it onto a dvd it just came up as a little video in the middle of the screen. how do i get it to just fit the whole page?
    -Joe

  • Workspace doesn't fit the screen anymore...

    Hello.
    Since today (and Mac OS X's update I installed this morning, I guess), my Photoshop CS6 workspace doesn't fit the screen of my 12 inch Cintiq (connected to a 2014 Macbook Air).  No matter what I do, it keeps it wrong.
    Trying to set the photoshop window to the whole Cintiq screen with the "green" Mac OS corner button, this is what I get:
    Hitting F won't do the trick, this is what it gets me:
    I tried to clear the Photoshop prefs, without success.  I checked for updates and found there was a Photoshop update I had not yet installed, and I did install it, to no success.  Needless to say, this makes my copy of Photoshop most unusable, which is a really big problem for an illustrator like me.  I really wish I can solve this as soon as possible.
    Thanks.

    Yeah, no results. Still the same.
    If I take my main window and move it up by myself, it's just gonna stay there until the next click somewhere, then it gets back to this wrong placement,.

  • E-mail won't fit the screen, anyone help?

    Hey all-
    I just "upgraded" (sorry, frustrated with this issue) my Curve to the 9350 and for every e-mail I receive I have to scroll left and right to be able to view the whole e-mail or use the zoom feature on every e-mail to make it fit the screen. 
    Is there a way to have the Curve do this automatically so that I don't have to scroll four directions but just up and down?  My old Curve didn't have this issue.
    Thanks a ton in advance,
    Brad

    Hi PurdueBrad,
    Welcome to the support community!
    Can you please check and tell me what size the font is set to on your BlackBerry Curve 9350 smartphone? You can find this setting in Options > Display > Screen Display. Does changing the font size make any difference in the message display?
    I look forward to your response.
    -FS
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.
    Click Solution? for posts that have solved your issue(s)!

  • IBooks landscape view fit to screen-width

    I believe it would be very nice to have option of fit to screen-width as default landscape view. Whenever I pass to next page, everything is so small that I have to resize it manually, all the time.
    Thanks

    This problem just cropped up for me.  Similar situation, but my tools are displayed on a second monitoe (not a laptop). I stumbled onto the sulotion!
    I had just moved one of the tool panels to near the bottom on the second monitor w/o realizing that it extended n pixels off the screen.  Once I moved it back up (so that no panels were hanging "off" the second monitor). I got fit-in-view back!

  • So I'm trying to get a window to fit my mac. Its a window on pokerstars if that helps, so no minimize/maximize. The window is actually too long vertical ways to fit the screen so the bottom is cut off? I hid bottom toolbar but still no help :-/ any help?

    So I'm trying to get a window to fit my mac. Its a window on pokerstars if that helps, so no minimize/maximize. The window is actually too long vertical ways to fit the screen so the bottom is cut off? I hid bottom toolbar but still no help :-/ any help? Yeah i have no fit screen button, the top toolbar doesnt have zoom/minimize available... any help???

    Hi RobSten1306
    Send us an email if you need help on this case and we can help look into this for you.
    You can email us using the contact the mods link in my profile under the section 'About Me'.
    Thanks
    Stuart
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Websites i search are weirdly shaped and are not fitting the screen well.

    Whenever i open something, It doesn't fit the screen well and i constantly have to scroll right and left when i am doing work. Also on top, the tabs are much larger than they were before and zooming in or out does not affect the tab size.

    Set the layout.css.devPixelsPerPx pref on the <b>about:config</b> page to 1.0 and if necessary, adjust layout.css.devPixelsPerPx starting with 1.0 in 0.1 or 0.05 steps (1.0 or 0.9) to make icons show correctly.
    *http://kb.mozillazine.org/about:config
    See also:
    *https://support.mozilla.org/kb/forum-response-Zoom-feature-on-Firefox-22
    Use an extension to adjust the text size in the user interface and the page zoom in the browser window.
    You can look at this extension to adjust the font size for the user interface.
    *Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/
    You can look at the Default FullZoom Level or NoScript extension if web pages need to be adjusted after changing layout.css.devPixelsPerPx.
    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • Why can I not get my windows to fit the screen

    I am not sure what happened today, but in Safari the window does not fit the screen on my Mac Book Pro, even when you click the green + button. What should I do to rectify. I have done a full Shutdown, and still the same.

    One other thing that might be handy:
    You can set the default Safari window size as follows.  Open a new window (command-n). Resize.  Close window.  Subsequent windows should open at that same size.
    charlie

  • How to make a movie of the Screen

    In OS 9 I was able to make a QuickTime of the screen while I was drawing in Photoshop. But that was a long time ago. How does it work in OS X Tiger. My old mac had a microphone. My new G5 imac does not.

    You can still capture a screen in OS X. It saves your captures as .png image files to your Desktop.
    Command-Shift-3 will capture all your see. Command-Shift-4 will turn your mouse into cross-hairs that you drag across any area. And a click on the spacebar (after the above keyboard commands) will turn your cursor into a camera icon that can capture individual windows. Still free.
    Snapz Pro allows you to capture (as QuickTime video) anything in its window. It continues to capture until you close it.
    One of my "movies" made with it:
    http://homepage.mac.com/kkirkster/mycareerfuture/
    Only 1.3MB's and it "plays" full screen.

  • Photos saved to wallpaper are enlarged and don't fit the screen since the new update to iOS 7

    Since the new update, when I try to save a new picture to my wallpaper and background, the photo is enlarged and does not fit the screen anymore.  Please fix!!!!

    A good point, but you'd better send your feedback directly to apple - hre, in a User-to-User Forum, Apple will probably not see it. Use one of the feedback forms:   http://www.apple.com/feedback/iphoto_ios.html
    I prevent the zooming by editing and cropping the photo to exactly the size I want in the Photos.app. In "Edit" mode I view it in Fulls creen, take a screenshot, and then set the screenshot as wallpaper.

  • I have a new I phone 5c and every few days the screen icons get bigger , almost like the don't fit the screen anymore. I have to shut phone down , why is this

    I have a new I phone 5c and every few days the screen icons get bigger , almost like the don't fit the screen anymore. I have to shut phone down , why is this

    probably your zoom is on. try double tapping with three fingers on your screen, it should go back to normal and then goto
    settings>general>accesibility>zoom and disable it

Maybe you are looking for