How to split text according to the textfield size

Hi, its very urgent if anybody can help me out..... i am
working on an e-learning course where all the text is coming
through XML. Client is very specific about not to use scrollbar.
They want to use more and back buttons to show the rest of the text
(they dont want the text to be scrolled either). For that I created
a function to part the text according to the textfield height in an
array. (one important point is that user can change font type, font
size anytime in between the course). Here is a bit of code
This code is working fine, but it gives undesired output if
we use html tags in helpText
please help me out..... please

Thanks FlashTastic,
I am sorry for not being able to convey my problem....
actually problem is not that code is not recognizing the tags but
the problem is.... let me explain, suppose there is a tag <b>
and </b> in xml..... code split the text so it split
<b> and </b> too and stored it in an array.... then it
adds the text i.e. This is a <b> sample </b> text.....
til the textheight of the textfield is less than the ._height of
hte textfield and finally i have a string that fits in the
textfield perfectly and when the parted text is assigned to the
textfield it recognize the tag and make that bunch of words or
sentence bold and that creates the problem.... i hope that this
time it is more clearer....
Thanks again.....

Similar Messages

  • How to enter text in a TLF textfield through a softKeyboard?

    Hi,
    How to enter text in a TLF textfield through a softKeyboard? (touchscreen keyboard)
    I can set the cursor but there is no text showing up after typing!
    Any ideas?

    It's for the web, so basically every device Flash Player runs on.
    Could be a touch-enabled or physical keyboard.
    Any ideas how to make TLF working across devices?

  • How to make text start at the top of a page in livecycle 9

    Hi, How can I get the text in a large text field to start at the top left of the field rather than at the center of the field? In addition, may one know how to make text wrap in the form as well?
    Thanks,
    David

    To set the Text alignment properties use "Paragraph" pallet you can make it visible by selecting Window>>Paragraph or Shift+F5
    And to allow text wrapping you need to select "Allow Multiple Lines" checkbox under "Object" pallet and "Field" tab. You can make Object pallet visible by selecting Window>>Object or Shift+F7.
    Good Luck,

  • When I move a shape or text in Photoshop, the dimensions/size changes. How do I fix this? ex) moved a 20px x 40px rectangle, and rectangle's dimensions changed to 20px x 40.16px.

    When I move a shape or text in Photoshop, the dimensions/size changes. How do I fix this?
    It's always a decimal point too.
    ex 1) moved a 20px x 40px rectangle, and rectangle's dimensions changed to 20px x 40.16px.
    ex 2) moved a 124pt text to the right (Shift + arrow right a few times) and text changed to 14.06pt.

    When I move a shape or text in Photoshop, the dimensions/size changes. How do I fix this?
    It's always a decimal point too.
    ex 1) moved a 20px x 40px rectangle, and rectangle's dimensions changed to 20px x 40.16px.
    ex 2) moved a 124pt text to the right (Shift + arrow right a few times) and text changed to 14.06pt.

  • JTextArea wordwrap according to the window size

    Hi All,
    I have a problem with JTextArea. I am constructing my UI as explained below:
    1. Panel with GridBagLayout.
    2. This panel have a grid of component. Each row will have a text area as a description and a text field to enter the value
    [ Text Area ] [Text Field]
    [ Text Area ] [Text Field]
    [ Text Area ] [Text Field]
    3. This panel is added to a scroll pane.
    Now the problem is when the description in the Text Area is large, then the horizontal scrollbar will be large. mean lot of horizontal scrolling.
    So I made text area to wrap at word boundaries and setting the columns size to 40. But now the problem is if the window is made large, still Text Area will wrap at 40th column leaving lot of empty area.
    So rather setting the column counts, i need the Text Area to wrap according to the window size. Is is possible? Looking for suggestions.....

    here comes the demo code. you can copy and run it.
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    public class TestScroll extends JFrame
         private int width;
         public void showUI()
              SwingUtilities.invokeLater(new Runnable()
                   public void run()
                        setSize(300,300);
                        setVisible(true);
                        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         public void init()
              JPanel panel = new JPanel(new GridBagLayout());
              GridBagConstraints gc = new GridBagConstraints();
              gc.fill = GridBagConstraints.HORIZONTAL;
              gc.weightx = 1; gc.weighty = 0;
              JTextArea area = new JTextArea("Please enter your name :");
              area.setOpaque(false);
              JTextField field = new JTextField(15);
              area.setWrapStyleWord(true);
              area.setLineWrap(true);
              panel.add(area,gc);
              gc.gridwidth = GridBagConstraints.REMAINDER;
              panel.add(field,gc);
              JScrollPane scroll = new JScrollPane(panel);
              //scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
              setContentPane(scroll);
         public static void main(String args[])
              TestScroll scroll = new TestScroll();
              scroll.init();
              scroll.showUI();
    }When you initially run it you can see that "Please enter your name is word wrapped.." when I expand the window, it unfolds (cool!) But when I shrink the window back, I expect the above to wrap again, rather than creating scrollbar :(.
    Note : I will need scrollbar, because I need to scroll vertically when there are many prompts for the user.
    Hope I have now clarified my query. Looking for a suggestion still !!

  • I uploaded a video from a flashdrive to my Mac and it compressed the video to lower quality and shrunk it in size. How do I get it to the original size?

    I uploaded a video from a flashdrive to my Mac and it compressed the video to lower quality and shrunk it in size. How do I get it to the original size?

    It changed the Aspect ratio of the video, as if it had been shot on a phone instead of a camera. When first looking at the footage it was in landscape aspect but when I transfered it to a memory unit to put on a different computer it uploaded it in a different ratio

  • How can I keep tabs on the file size when importing from the Event Library into a Project? I want to ensure the movie will fit onto a 4.7Gb disc?

    How can I keep tabs on the file size when importing from the Event Library into a Project? I want to ensure the movie will fit onto a 4.7Gb disc?

    iDVD does not care about file sizes, as it compresses the file to the standard DVD format of mpeg2.
    It only cares about length i.e. max 2 hours including titles etc.
    iDVD encoding settings:
    http://docs.info.apple.com/article.html?path=iDVD/7.0/en/11417.html
    Short version:
    Best Performance is for videos of up to 60 minutes
    Best Quality is for videos of up to 120 minutes
    Professional Quality is also for up to 120 minutes but even higher quality (and takes much longer)
    Professional Quality: The Professional Quality option uses advanced technology to encode your video, resulting in the best quality of video possible on your burned DVD. You can select this option regardless of your project’s duration (up to 2 hours of video for a single-layer disc and 4 hours for a double-layer disc). Because Professional Quality encoding is time-consuming (requiring about twice as much time to encode a project as the High Quality option, for example) choose it only if you are not concerned abo
    In both cases the maximum length includes titles, transitions and effects etc. Allow about 15 minutes for these.
    You can use the amount of video in your project as a rough determination of which method to choose. If your project has an hour or less of video (for a single-layer disc), choose Best Performance. If it has between 1 and 2 hours of video (for a single-layer disc), choose High Quality. If you want the best possible encoding quality for projects that are up to 2 hours (for a single-layer disc), choose Professional Quality. This option takes about twice as long as the High Quality option, so select it only if time is not an issue for you.
    Use the Capacity meter in the Project Info window (choose Project > Project Info) to determine how many minutes of video your project contains.
    NOTE: With the Best Performance setting, you can turn background encoding off by choosing Advanced > “Encode in Background.” The checkmark is removed to show it’s no longer selected. Turning off background encoding can help performance if your system seems sluggish.
    And whilst checking these settings in iDVD Preferences, make sure that the settings for NTSC/PAL and DV/DV Widescreen are also what you want.
    http://support.apple.com/kb/HT1502?viewlocale=en_US

  • How do I create a column the same size?

    How do I create a column the same size?
    I'm concatenating up to 6 cols into one col. If one of the column has a space it will shrink it (I used varchar2 and char) .
    e.g: col1= '123456', col2= ' ', col3= ' ',col4= ' 123', col5=' 51',....etc
    I want to see them as :colx= '123456', ' ', ' ',' 123',' 51'
    Thanks for your help.

    You are alomost right,:-)
    since OP said :If one of the column has a space it will shrink it (I used varchar2 and char) .
    So you should use replace function not trim function.
    test >  select  replace(' a b c ',' ') from dual
      2  /
    REP
    abc
    test >  select trim(' a b c ') from dual;
    TRIM(
    a b c

  • TS3274 Somehow the information on my iPad is too large and i cannot see all the icons at once. How do I go back to the normal size? all the icons. How can I resize the infor on scren?

    Somehow the information on my iPad is too large and i cannot see all the icons at once. How do I go back to the normal size?

    Have you tried resetting your device? http://support.apple.com/kb/ht1430

  • How to display text value in the header data (Header text) of credit memo

    Hi...
    I need to display the text value of the text field in the header text of the header data in credit memo.
    The text values are stored in a ztable and i need to display it based on the billing document stored in vbrk (zfield) that was inserted during the creation of credit request..
    Appreciate your help on how to do this...
    Thansk and will surely reward the points..
    Kanthi..

    Hi kanthi ,
                   Read the value from Z Table and during the creation of cedit memo check out for some exit where u the value from The zTABLE AND use function module SAVE_TEXT with object and id in the header text .
    Please award if useful.

  • How do i sort according to the date modified.

    Hi, i have a list of jobs that are created over a period of time. The date/time is stored when the job is created. How do i sort them according to the date/time they are created instead of sorting them by alphabetical order. This is the following code, i have
    public void setupJobPage()
    pageno = 5;
    String theFiles[];
    String directory = new String(nanocadHome + "\\users\\" + user + "\\" + session);
    File toRead = new File(directory);
    PageJobPanel = new Panel();
    PageJobPanel.setLayout(null);
    backToWaltz = new Button("Return to Waltz");
    backToWaltz.addActionListener(this);
    PageJobPanel.add(backToWaltz);
    backToWaltz.setBounds(new Rectangle(40, 5, 200, 20));
    sessionChecksLabel = new Label("   Name");
    sessionChecksLabel2 = new Label("Last Modified");
    sessionChecksLabel.setBackground(new Color(170, 198, 198));
    sessionChecksLabel2.setBackground(new Color(170, 198, 198));
    sessionChecksLabel.setBounds(new Rectangle(15, 30, 100, 20));
    sessionChecksLabel2.setBounds(new Rectangle(115, 30, 200, 20));
    PageJobPanel.add(sessionChecksLabel);
    PageJobPanel.add(sessionChecksLabel2);
    theFiles = toRead.list();
    sessionChecks = new Checkbox[theFiles.length];
    lastModifiedLabels = new Label[theFiles.length];
    sessionCheckGroup = new CheckboxGroup(); 
    for (int i = 0; i < theFiles.length; i++)   
    File temp = new File(directory + "\\" + theFiles);
    Date tempDate = new Date(temp.lastModified());
    lastModifiedLabels[i] = new Label(tempDate.toString());
    sessionChecks[i] = new Checkbox(theFiles[i], sessionCheckGroup, false);
    if ( ((String)sessionChecks[i].getLabel()).equals(session) )
    sessionChecks[i].setState(true);
    PageJobPanel.add(sessionChecks[i]);
    PageJobPanel.add(lastModifiedLabels[i]);
    sessionChecks[i].setBackground(new Color(170, 198, 198));
    lastModifiedLabels[i].setBackground(new Color(170, 198, 198));
    sessionChecks[i].setBounds(new Rectangle(15, 50 + 20 * i, 100, 20));
    lastModifiedLabels[i].setBounds(new Rectangle(115, 50 + 20 * i, 200,20));
    sessionButtonPanel = new Panel();
    sessionButtonPanel.setLayout(null);
    sessionButtonPanel.setBackground(new Color(187, 187, 221));
    createSession = new Button("View Result");
    deleteSession = new Button("Delete");
    createSession.addActionListener(this);
    deleteSession.addActionListener(this);
    sessionButtonPanel.add(createSession);
    sessionButtonPanel.add(deleteSession);
    createSession.setBounds(new Rectangle(40, 5, 85, 20));
    deleteSession.setBounds(new Rectangle(210, 5, 50, 20));
    PageJobPanel.add(sessionButtonPanel);
    sessionButtonPanel.setBounds(new Rectangle(15, 50 + 20 * theFiles.length + 10, 300, 30));
    sessionButtonPanel.repaint();
    PageJobPanel.setSize(400, 50 + 20 * theFiles.length + 40);
    GridBagConstraints c = new GridBagConstraints();
    c.anchor = GridBagConstraints.NORTH;
    c.gridwidth = 1;
    c.gridx = 0;
    c.gridy = GridBagConstraints.RELATIVE;
    c.weightx = 1;
    c.weighty = 1;
    add(PageJobPanel, c);
    Thanks

    Arrays.sort(Object[], java.util.Comparator);

  • How to remove text without destroying the picture?

    I am new in photoshop and I am trying to remove the text down of the picture so that I can add another one.
    Is watermark, I have seen sosme videos on Youtube but seems didn't work so well to me.
    If someone can help how to do delete that text and add another one similar with it I would really appreciate it.
    Thanks in advantage

    Contact the owner of the copyright for permission to use without the watermark.

  • How to set a value to the TextField on keyPress Event?

    Hai,
    I am using Jdev 11g.
    In my jspx page,i have an Input Text...I want to set a value to that input text when i press any button (say F2) inside that text field .I tried with clientListener and server Listener..But it is not set.
    In jspx page
    *========*
    <f:facet name="metaContainer">
    <trh:script>
    function onKeypressClientListner(evt) {
    var _txtField; var valueStr;
    _txtField = evt.getSource();        
    if (evt.getKeyCode() == AdfKeyStroke.F2_KEY) {
    valueStr = _txtField.getSubmittedValue()
    AdfCustomEvent.queue(_txtField,"onKeyPressServerListner",{payload:valueStr}, true); evt.cancel();
    </trh:script>
    </f:facet>
    <af:inputText label="Label 1" id="it1"
    binding="#{backing_CheckKeyPress.itxtInputText}">
    <af:clientListener method="onKeypressClientListner" type="keyUp"/>
    <af:serverListener type="onKeyPressServerListner"
    method="#{backing_CheckKeyPress.serverKeyListner}"/>
    </af:inputText>
    In CheckKeyPress.java
    *======*
    public void serverKeyListner(ClientEvent clientEvent)
    System.out.println("Inside Server Listener");
    itxtInputText.setValue("Hai");
    AdfFacesContext.getCurrentInstance().addPartialTarget(itxtInputText);
    After executing this,program will give output as Inside Server Listener . But the TextField value is not setting..

    I got it..Just set immediate property to true

  • How to open text URL in the new tab

    Hi guys,
    We know that when we click on a hyperlink it will directly open the linked web site, e.g.
    www.bing.com
    But sometimes we may find some URL in plain text that we couldn't click on it, e.g. www.bing.com
    I'll have to select the URL and copy&paste it to a new tab to open it, this is time wasting.
    The time IE 9 came out, I found a wonderful add-on, Open URL in New Tab (with Preview)
    This will do the trick to open the text URL in the new tab by right click on it.
    http://www.iegallery.com/us/addons/detail.aspx?id=3614
    But I don't like two things of it.
    1st, it will try to preview the web site when I using it which is undesired.
    2nd, it will open the link through another site and then jump back to the link I need to open. But I'd like to open the link directly. Which will open the link more quickly also save my time.
    Questions:
    Is there any other way to open the plain text URL directly? I mean without copy and past it to another page.
    It would be great if I can open the URL by dragging it like the other...

    Is there any other way to open the plain text URL directly? I mean without copy and past it to another page.
    In these forums?  If you are using the NNTP Bridge you could view your message in your News reader's Plain text mode and then see that your two examples worked equivalently.   <eg>
    Otherwise, in general, I agree there are some pretty obvious "accelerators" which could have been provided.  
    I suspect much of the problem will be due to "security".   E.g. Windows used to have a functionality called text scraps, where you could select some text and drag and drop it just about anywhere to create a scrap file.   That's
    not working for me any more either.   If it were we could at least drag it to the Address bar and press Enter...
    http://technet.microsoft.com/en-us/magazine/2008.02.windowsconfidential.aspx
    (Microsoft search for
       text scraps
    <quote>
    virus writers loved this
    </quote>
    QED

  • How to paste text box into the same position

    when I used
    adobe acrobat 6.0, I can paste the text box in the same position in the next page, it is very useful for editing files with similiar information. after I use acrobat 9.0, I found that I can not paste the text box in the same position in the next page. do you know whether the 9.0 can realize the function of "paste in the same position"?

    I am using adobe acrobat 9.0, when I use object select tool " the arrow pointing 11 clock", I can not find Duplicate command. Mr./Ms. try67, can you realize the function of paste in the same position? very thanks for your reply and help.

Maybe you are looking for

  • Can't see boards in a VXI chassis connected via VXI-MXI-2 cards using a GPIB-USB adapter

    I'm working on a system that has two VXI enclosures, and the two are bridged via VXI-MXI-2 boards in each of them.  The first one has a GPIB-VXI board in slot 0, and I have a Winodows XP computer connected to that with a GPIB-USB-HS adapter.  The pro

  • No preview available

    Running Windows XP where clicking on pdf documents to open them results in Windows Fax Viewer opening displaying the message "No Preview Available". Have tried removing the Acrobat program and re-downloading it, but to no avail.

  • Refund needed for an additional subscription

    I received the famous message about my subscription expiring in 3 days a couple of days ago, so I went to renew it without checking the dates. It occurs, that instead of renewing my annual subscription, I had bought another one, which is the same tha

  • Third party cases for ipad

    Does anyone know the "skinny" on why the Apple stores are no longer selling any cases for the ipad including skins? They were at the intro.

  • How is the iphone4s working. iam getting one tmr

    How is the iphone4s working. iam getting one tmr