Setting JTextPane to single line?

Hi all,
just wondering, is there anyway of setting the JTextPane to only allow the user to enter a single line of text. I want to allow the user to enter text and images, so I need the JTextPane. But I don't want to allow them to enter more than one line.
Is there any way of doing this? Will I have to create an editor kit, or Document, or add a key listener to listen for "Enter" key being pressed?
thanks,
Justin

i don't know, but u cud use KeyBindings, u can use that and do a binding for every key that is pressed (like, u want enter, so there is a keybinding 4 enter, if u want left, right, etc, then u do a different one. keyListeners r 4 when u need to get like more than 10 specific keys, and it gets confusing....hope i made sense)

Similar Messages

  • I am filling out an online application for school. Is it possible to set Firefox to check spelling when in a single-line text box without having to right click every time?

    I want to be able to set spell check to occur automatically even for single-line text boxes.

    You can set the pref <b>layout.spellcheckDefault</b> to <i>2</i> on the <b>about:config</b> page to perform the spell check on single line and multi line text fields.
    * http://kb.mozillazine.org/layout.spellcheckDefault
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold(user set).
    *Preferences can be reset to the default or changed via the right-click context menu.

  • Converted single line text to multiple and want to have rich text editing in layout

    We had a text field in a site that was initially set as single line of text. We needed it to be bigger and also allow formatting. So I added the field into the page layout.
    Changing
    <SharePointWebControls:TextField id="habitat" FieldName="Habitat" runat="server"/>
    to
    <SharePointWebControls:NoteField id="habitat" FieldName="Habitat" runat="server"/>
    But it doesn't show any rich text editing options and displays the full html tags in the field.
    If I open the page in the edit properties screen instead, then the field displays as I want it with the rich text editing options available in the ribbon, and text showing as bolded instead of like this:
    <div>This is <strong>the </strong>habitat field.</div>
    This is a site using the 2010 Publishing template running in compatibility mode on a 2013 server.
    How can I get my page layout to behave the same way as the edit properties screen does?

    Hi,
    Here are two solutions for your reference:
    1. We can use the InputFormTextBox control to achieve it.
    <SharePoint:InputFormTextBox ID="habitat" RichText="true" RichTextMode="FullHtml" runat="server" TextMode="MultiLine" Rows="20"></SharePoint:InputFormTextBox>
    http://blog.qumsieh.ca/2009/01/13/how-to-add-a-rich-text-editor-to-your-custom-application-pages-or-web-parts/
    http://blog.mastykarz.nl/rich-text-editor-control-sharepoint-2010/
    2. We can use the RichHtmlField control to achieve it.
    <PublishingWebControls:RichHtmlField id="habitat" FieldName="Habitat" runat="server"/>
    http://msdn.microsoft.com/en-us/library/office/ms561507(v=office.14).aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Text should be displayed in a single line in jsff page

    Hi ,
    I have several af:selectOneChoice components whose labels should be displayed in a single line .
    the page has a left and right navigator panel. when i drag the navigators to the center , the scroll bar should be enabled and the texts (labels) of the various components in the jsff page should be displayed in a single line.
    But , the text gets wrapped into multiple lines. PFA the screen shot and the code of the jsff page

    Hi Maddy,
    for this issue you can use WAD 7.0. There you can set the numbers of columns and rows which are displayed easily within the analysis item. You can also determine if you want to have scroll bars or paging tabs (like in Query Designer).
    Brgds,
    Marcel

  • How do I delete a single line in a WAD input layout?

    Hello to all,
    I've created a standard delete function and I don't know how to "data bind" it to a single line of my web layout in order to only delete the selected line.
    Can anyone please help and explain how to do it?
    Thanks in advance for your help.
    Best regards,
    Francesco

    Hi Francesco,
    have never done this before using a delete function but for similar planning requirements. Just give it a try with this procedure:
    At WAD you can set the behavior for each analysis item individually. If you set the "row selection" (analysis item, properties, web items parameters) for the rows to "single" or "multiple" the user can select rows (probably this is nothing new to you).
    Just imagine you have the variable "product" in the row of your query. In this case just create a variable for this characteristic. In doing so you can use the variable within your delete function or within the planning filter belonging to this function for the characteristic "product". The last step is to "link" the characteritic value(s) of the selected rows  to the planning function/filter. If you implement the planning fuction or the planning sequence in WAD you can do a data binding for the variable(s) as follows:
    Variable: (name of your variable)
    Variable type: Selection_binding_type
    Binding type: item_characteristic
    Web Item: (technical name of your selectable analysis item)
    characteristic: (name of your characteristic)
    Please keep us updated if it works, for questions just let us know.
    Brgds,
    Marcel

  • Trouble with auto size text in a single line form field

    Hi.  I'm having an issue with filling out a form in Adobe Reader on my iPad.  The text field is single line.  The font is set to "auto" so that the line of text will not exceed a certain width.  When filling out this form on my laptop using Adobe Reader, it works fine.  As I type additional text, once the field is filled, it shrinks the text font size.  On my iPad, however, it won't let me type any more text in the field once I reach the end.  Does Adobe Reader for iPad not support the "auto" font size in form fields?  And I did check that my version of Adobe Reader is up to date on my iPad, so I do have the latest version.
    Thanks in advance for your help,
    Ashley

    Actually, nevermind.  It must be something wrong with the file.  I tried opening another file and auto resize worked perfectly on it.  Weird though that it works on one file and not another.
    Thanks!
    Ashley

  • Writing to a file in Single Line doesn't work

    DECLARE
    FileHandler UTL_FILE.FILE_TYPE;
    cursor c1 is
    SELECT DISTINCT address_attribute9 address_attribute9
    FROM ar.ra_customers_interface_all;
    BEGIN
    fileHandler := UTL_FILE.FOPEN('/u03/sqlcom/outbound', 'Error_Records.txt', 'w');
    for rec in c1 loop
    UTL_FILE.PUTF(fileHandler,''''||rec.address_attribute9||''''||',');
    end loop;
    UTL_FILE.FCLOSE(fileHandler);
    EXCEPTION
    WHEN utl_file.invalid_path THEN
    raise_application_error(-20000, 'Invalid path file or path not in INIT.ORA.');
    END;
    Following error message is appearing
    Exception Occurred:ORA-29285: file write error
    PL/SQL procedure successfully completed.
    I tried with UTL_FILE.PUT(fileHandler,''''||rec.address_attribute9||''''||',');
    Requirement is to write the whole content into a single line,If I try to write into a seperate line it works.

    Modified the code as following and it worked:
    set serveroutput on
    DECLARE
    errorblob BLOB;
    errorlength NUMBER;
    filehandle utl_file.file_type;
    counter NUMBER := 1;
    remainder NUMBER;
    buflen NUMBER := 32000;
    cursor c1 is
    SELECT DISTINCT address_attribute9 address_attribute9
    FROM ar.ra_customers_interface_all;
    BEGIN
    DBMS_LOB.CREATETEMPORARY(errorblob, true,dbms_lob.session);
    FOR rec in c1 LOOP
    dbms_lob.append(errorblob, utl_raw.cast_to_raw(''''||rec.address_attribute9||''''||','));
    END LOOP;
    errorlength := dbms_lob.getlength(errorblob);
    filehandle := utl_file.fopen('/u03/sqlcom/outbound', 'Error_Records.txt', 'wb');
    LOOP
    IF counter < (errorlength - buflen) THEN
         remainder := buflen;
    ELSE
    remainder := errorlength - counter;
    END IF;
    utl_file.put_raw(filehandle, dbms_lob.substr(errorblob, remainder, counter));
    counter := counter + remainder;
    utl_file.fflush(filehandle);
    if counter = errorlength then
    exit;
    end if;
    end loop;
    utl_file.fclose(filehandle);
    end;
    /

  • 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.

  • How to print long raw text data in report output in single line?

    Hi All,
    I have a requirement where I need to print raw comma separated text data in the report output which end user will open in excel and can sort as required. I can not directly generate excel output.
    Now there is huge set of data and each row from the report query should be get printed on single line, It should not get printed on the next line.
    I tried to extending the report with 240 characters but still there are some text data which is getting printed on the next line.
    Please share your view if someone has any solution on this issue.
    Thanks in Advance.
    Arun

    Make the report even wider. By default a report layout can be 10 pages wide. If you need more, change the "Max. Horizontal Body Pages" property, and extend your layout too.
    IMHO, I wouldn't even use Reports to create a csv file. Utl_file or an sqlplus script that spools to a file are better options I think.

  • Output the element in a single line

    Hi all,
    I encontered a problem when using castor xml tool to gengerate an xml file.
    The parser that I an using is org.exolab.castor.parser=org.apache.xerces.parsers.SAXParser.
    And I set org.exolab.castor.indent=true in the castor.properties
    I got the following ouput:
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE subscribers PUBLIC "...
    "subscriber.dtd">
    <subscribers provider="..."/>
    <user name="..."
    pass="..."/>
    </subscribers>
    What I expect is that the user element should be in a single line like following:
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE subscribers PUBLIC "..." "subscriber.dtd">
    <subscribers provider="..."/>
    <user name="..." pass="..."/>
    </subscribers>
    What should I do to achieve this goal?
    I found there is a property which might be useful, but I don't know exactely how to use it:
    org.exolab.castor.features=
    thanks in advance

    Hello,
    I've found a solution:
    We can use our own Serializer to control the output format:
    In the castor.properities,
    by default org.exolab.castor.serializer=org.apache.xml.serialize.XMLSerializer
    I deprived this class and overrided all the constructors and the setOutputFormat method:
         public void setOutputFormat(OutputFormat arg0) {
              arg0.setIndenting(true);
              arg0.setLineWidth(0);
              super.setOutputFormat(arg0);     
    and it works fine
    Thanks anyway
    Message was edited by:
    laseine

  • PBDOM : Exporting to XML file gives a single line

    I've been starting developing with PowerBuilder 12.5 a few weeks ago. I had to write some XML files, so I got familiar with the PBDOM library.
    I can build a lot of different things, it's very nice, but one thing still bothers me :
    In the output file, the whole XML is written on a single line.
    I use the SaveDocument function.
    For example, here is some code :
    PBDOM_Document doc
    PBDOM_Element noderoot, node1, node11, node12
    doc = CREATE PBDOM_Document
    doc.NewDocument("NodeRoot")
    noderoot = doc.GetRootElement()
    node1 = CREATE PBDOM_Element
    node1.SetName("Node1")
    noderoot.AddContent(node1)
    node1.SetAttribute("Attr", "AttrValue")
    node11 = CREATE PBDOM_Element
    node11.SetName("Node11")
    node11.AddContent("Here is a value")
    node1.AddContent(node11)
    node12 = CREATE PBDOM_ELEMENT
    node12.SetName("Node12")
    node12.AddContent("Here is another value")
    node1.AddContent(node12)
    doc.SaveDocument("myDoc.xml")
    Here is the result when I open it with notepad++
    <NodeRoot><Node1 Attr="AttrValue"><Node11>Here is a value</Node11><Node12>Here is another value</Node12></Node1></NodeRoot>
    Whereas I wanted :
    <NodeRoot> <Node1 Attr="AttrValue"> <Node11>Here is a value</Node11> <Node12>Here is another value</Node12> </Node1> </NodeRoot>
    With the notepad++ XML tools plugin, I can use the "pretty print" function to get this nice representation. But I would like my file to be formatted this way from the beginning. I noticed that the "line ending" was set to UNIX format (indicator on bottom right of the window), but I'm working on Windows. When I use the menu to convert it to Windows format (CR+LF), it changes this indicator, but the code stays on one single line.
    Is there a way to tell PBDOM to export the XML file with a nice output ?
    Thank you !
    Notes :
    - Opening the XML file with Internet Explorer or Google Chrome gives me a nice vizualisation, with indentation, line breaks...
    - Adding a <?xml version="1.0" encoding="ISO-8859-1" ?> does not help (I've been doing it while exporting some more complex files, but I still get the output on one line...)

    Here is a very simple powerbuilder example. It uses MSXML instead of PBDOM. See my comments for hints how to use it with PBDOM.
    oleobject lole_dom, lole_root, lole_element1, lole_element11, lole_element12
    oleobject lole_Writer, lole_saxreader
    string ls_result
    // build DOM (you don't need this if you use PBDOM)
    lole_dom = create oleobject
    lole_dom.ConnectToNewObject ("Msxml2.DOMDocument")
    lole_root = lole_dom.CreateElement ("NodeRoot")
    lole_dom.documentElement = lole_root
    lole_element1 = lole_dom.CreateElement("Node1")
    lole_root.AppendChild(lole_element1)
    lole_element1.SetAttribute("Attr", "AttrValue")
    lole_element11 = lole_dom.CreateElement("Node11")
    lole_element11.AppendChild (lole_dom.CreateTextNode("Here is a value"))
    lole_element1.AppendChild(lole_element11)
    lole_element12 = lole_dom.CreateElement("Node12")
    lole_element12.AppendChild (lole_dom.CreateTextNode("Here is another value"))
    lole_element1.AppendChild(lole_element12)
    // this saves the DOM without formatting
    //lole_dom.save ("d:\testxml.xml")
    // this part is for formating
    lole_Writer = create oleobject
    lole_saxreader = create oleobject
    lole_Writer.ConnectToNewObject ("MSXML2.MXXMLWriter")
    lole_saxreader.ConnectToNewObject ("MSXML2.SAXXMLReader")
    lole_Writer.omitXMLDeclaration = True
    lole_Writer.indent = True
    lole_saxreader.contentHandler = lole_Writer
    // instead of DOM you can also put a XML string to parser: lole_saxreader.parse ("<node>...</node>")
    // so you can also use the PBDOM output directly
    lole_saxreader.parse (lole_dom)
    // here is your formatted output
    ls_Result = lole_Writer.output
    MessageBox ("", ls_result)
    lole_writer.Disconnectobject( )
    lole_saxreader.Disconnectobject( )
    lole_dom.Disconnectobject( )
    DESTROY lole_writer
    DESTROY lole_saxreader
    DESTROY lole_dom

  • Text frame only shows a single line / always overset

    I have an InDesign CS 4 file that I'm trying to open in CS 5.5. When I try to edit the text in any text frame (e.g., in Story Editor), it tells me the text is overset and only displays a single line even though the field is clearly tall enough. Basically, it won't wrap the text onto the next line. In fact, trying to create a new text frame is always overset. It works correctly if I create a new document though.
    Any help is appreciated. Thanks.

    This means the frame is too narrow to hold the line, which can happen for a variety of reasons. IF text shows on the first line as you start to type, then disappears after a number of characters, you've got a setting that is preventing the text from breaking at the end of a line, possibly No Break applied to all text, or you have hyphenation turned off and are using non-breaking spaces (I see that a lot in imported Word files). If you never see any text, then it's probably an indent problem, either a frame attribute, or more likely the paragraph indent settings for the style or applied to the text as local formatting (saw that one the other day, also in an imported Word file).

  • Ai-cs6 How Do I trace a hand drawn sketch to a single line vector outline?

    So I am basically a brand new user to ai-cs6 and have been working on a project for a friend. I've drawn up the basic components of the logo she wants, all separate individual pieces. My intention is/was to trace in each piece, and scale, rotate, and clean them up according to how the final piece should look. Where I'm running into trouble is that the sketches are not point perfect, meaning there's some shading in the hand drawns, and the lines are rough in areas. I'm trying to avoid redrawing the pieces because we both are really happy with where they're at. What I'd like to do with ai-cs6 and I'm hoping this community of creative individuals can help is to trace very simply a one line vector of the outline of the image. So instead of creating a piece that has stroke straight from the scanned in artwork, I get a single line, with multiple points, that flows the simple shape of the piece. From there it seems it would be pretty simple to just increase the stroke weight and modify the style of line to make it look how we would like. All I've succesfully been able to do so far, with the help of some videos and google searching, is to get a traced image that's basically an outline of the sketch. This is o.k. except that since the sketch has some rough line sections ai-cs6 is adding either a lot of detail and making it look pretty rough, or it's missing entire sections and leaving them blank. Any insight and help into getting this figured would be great, I'm gonna roll with what image trace is giving me so I can give her an image of the logo today, but hoping that I can clean it up and get closer to a finished product by next week. Thank you very much I'm grateful that there are discussion forums like this out there to help users of all skill level continue flowing and working with these awesome adobe products.
    Max

    What you're talking about is generically called autotracing in centerline mode. Most autotrace programs can either try to trace all the way around the areas of dark pixels (outline tracing), or try to trace along the middles of areas of dark pixels (centerline tracing).
    In Illustrator's autotrace settings, for centerline mode, you turn off the tracing of outlines (fills) and turn on the tracing of centerlines (strokes). That's the basic setting. From there, you try to adjust the various threshold settings to get as close to what you want as you can.
    When Illustrator's autotrace feature is set to try to trace centerlines, it also tries to set the vector path stroke weights to approximate the thicknesses of what it interprets as a stroke. So after the autotracing is done,  you can expand it and then globally set the stroke weight to a uniform value.
    Beyond that, no one can really advise you more specifically without seeing the specific image involved. Every image is different.
    Generally speaking, autotracing is crap. It's an amateurish workaround to avoid doing what should really be done: Trace the paths manually with the drawing tools.
    JET

  • Output of select query in a single line

    hi,
    I want to know how to get the each row in a table to be printed in a single line.. Each row in the table will be of 1500 characters length..
    Thanks

    Is there any limit to the value that we can specify
    for linesize.. I read somewhere that the max value is
    dependent on systemIn [url http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm#SQPUG085]the documentation, they don't talk about a maximum, but I saw there is one:
    SQL> set linesize 1500
    SQL> set linesize 32767
    SQL> set linesize 32768
    SP2-0267: linesize optie 32768 ligt buiten toegestane bereik (1 t/m 32767).Regards,
    Rob.

  • 3 buttons and 2 select lists in a single line

    Hi,
    I have an application which has 3 region buttons ( say, b_1, b_2, b_3) and 2 selects lists (say, sl_1, sl_2). I want to display all the five buttons and items in a single line in the following order:
    b_1 b_2 sl_1 b_3 sl_2
    I have set Begin on new line = no
    and Begin on new field = no, for both the two select lists.
    But it does not seem to work.
    Do anyone have any idea, how to sort out this issue?
    A quick reply would really be appreciated.
    Regards,
    AM

    Hi Vikas,
    Please have a look into the application at
    http://apex.oracle.com/pls/otn/f?p=34363:1:6206621111100168:::::
    I have created two select lists P1_X and P1_Y. These items are hidden on page load event. When the associated button is clicked the list should appear on the page.
    Written the following code in 'Pre element text' for each of the items:
    P1_X :: <input type="button" value="X" onclick="f_X();" class="t17Button" />
    P1_Y:: <input type="button" value="Y" onclick="f_Y();" class="t17Button" />
    Where, f_X() and f_Y() are displaying the select lists.
    As you can see, the select lists are appearing just below the html buttons, which I want side by side with the buttons.
    Could you please figure out the issue?
    If you want I can share my login details.
    Regards,
    AM

Maybe you are looking for

  • Configuring business packages in E.P 7.0

    Hi friends,   Can anybody tell me the stpes in brief regarding how to configure the business packages in E.P 7.0. And if something need to be implemented in the business package , say for example in ESS(HR) , where i can go and make changes according

  • Multiple passes (groups) on same query data

    I need to run a report which has two sets of results, one for the current month, one for year to date. This would be easy with subreports, but unfortunately it's a very complex report which has a number of subreports already. I'm using CR10 and SQL S

  • No service since recent update from EE, unable to make or receive calls

    received message from EE - We have updated some of your settings. To make sure you can continue using your phone and services, please restart your phone now. since restarting my phone I have had no service and cannot make or receive calls

  • North Dakota state tax problema

    Hi guys! I am running october payroll for an employee in ND with W4 status married. The problem is when I see ND tax part I get $119.00 for the basic salary of $4,375.76 but if I use paycheckcity.com to compare that amount I get $105.00 Employee is b

  • Does Flash Media Live Encoder work with all the blackmagic-Design Decklink Studio?

    Does Flash Media Live Encoder work with all the Blackmagic-Design Decklink Studio?