Changing color of  text in the input field

hi
when i disable the input field , the text written in it has very light color. How can i change the color of the displayed text in the input field.

Hi Harsimran,
changing the text color of an input field is not possible. However, you can build a workaround:
1. take an expression box, place it exactly over your input field
2. change its text color and take the value of your input field as value being displayed
3. instead of making your input field disabled, make it hidden and show the expression box instead.
Thus, instead of enabling/disabling your input field, switch between expression box/input field to be displayed. I hope it's clear what I mean. If not, don't hesitate to ask again.
Best regards,
  Benni

Similar Messages

  • How to get label text  for the Input Field in code

    Hi,
    I have created Two UI elements InputField  and Label.  I set the property 'labelFor' of the UI element Label to 'InputField'.
    This is my requirement .  I am having the Id of InputField in the code . I want to get the value of 'text' of  the UI element Label.
    Please suggest how to proceed.
    Points will be rewarded for helpful answers.
    Best Wishes
    Idhaya R

    Not sure why you really need this, but you could do something like
    IWDInputField field = (IWDInputField) view.getElement("inputFieldID");
    IWDLabel fieldLabel = null;
    for (Iterator children = field.getContainer().iterateChildren(); children.hasNext(); )
      IWDUIElement child = (IWDUIElement) children.next();
      if (child instanceof IWDLabel)
        IWDLabel  label = (IWDLabel) child;
        if ( field.getId().equals(label.getLabelFor())
          fieldLabel = label;
          break;
    Armin

  • How do you wrap the text on an input field with type="button"

    I want to put 2 lines of text on an input field.
    The button size is fixed at 75 and if there is more than 10 characters it truncates the text.
    The input field is defined as :
    <input type="button"
    value="CI<br>Discrepency"
    class="buttons75x75"
    onclick="javascript:callForm('ciDiscrepency');"/>
    If you can show me how, I would really appreciate it.
    -Gary

    Dug up the code I used to do this a while back:
    //The style sheet
      <style type="text/css">
        .buttonUp {
          border-style:outset;
          border-width:2px;
          width:3em;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
        .buttonDown {
          border-style:inset;
          border-width:2px;
          width:3em;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
    </style>
    //... Example buttons
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';"
                            onclick="alert('Clicked on Small One');">He</div>
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello</div>
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello World</div>
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello<br/>World</div>
      <div class="buttonUp" style="width:5em;" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello World</div>You could put any javascript you want on the onclick event, so you would call the javascript you previously used to submit the form and set the input name. In this example I had all the buttons be a fixed width, if you leave out the width in the style sheet then the block will snap to fill the same width as the text inside it, much like normal buttons do. The difference is, with a fixed width then text wrapping occurs automatically (like in the 3rd button) while without a defined width the div will only display a second line when the line break is added. Note the the fixed width can be over-ruled by an inline style if needed (last sample).
    The website I pointed to before has a simpler solution (less javascript events needed). An implementation for his approach would be:
    //The style sheet
      <style type="text/css">
        .button {
          border-style:outset;
          border-width:2px;
          color:#000;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
          text-decoration:none;
          display:block;
        .button:active {
          border-style:inset;
          border-width:2px;
          color:#000;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
          text-decoration:none;
          display:block;
      </style>
    //... Example buttons
      <a class="button" href="#" onclick="this.blur();alert('Now you clicked linkey');return false;">Hello<br/>World</a>Same deal here with the fixed-width vs.fit-to-content. I add the 'return false;' to the list of the onclick commands so IE doesn't make the 'link clicked' noise and the URL doesn't go to thispage.html#.
    All these buttons work in FireFox 2, IE 7, and Safari 3 if they are running in STRICT mode. The button colors and borders don't precisely match FF and IE buttons, but they are close (although they aren't close at all to Safari buttons).

  • Value of the input field changing automatically on click of enter

    I  was trying to write a simple report that has a single input field with a f4 help for a directory browser attached. the input field  can only be filled using the f4 help ( achieved through function module DYNP_VALUES_UPDATE) . The problem is after the input field is populatd if i click on enter or press f8 the text in the input field changes automatically. Please can anyone find the reason for this behaviour and provide a solution .Thanks in advance.report code attached.
    Regards,
    Kiran A.
    REPORT  zpgm_md61_error1.
    PARAMETERS: p_file TYPE string MODIF ID abc LOWER CASE .
    DATA: dyname TYPE programm,
          dynumb TYPE sy-dynnr.
    DATA: dynpfields TYPE TABLE OF dynpread WITH HEADER LINE.
    DATA: lv_folder TYPE string,
          sel_folder TYPE string.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM disable.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL METHOD cl_gui_frontend_services=>directory_browse
        EXPORTING
          initial_folder       = lv_folder
        CHANGING
          selected_folder      = sel_folder
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          OTHERS               = 4.
      dynpfields-fieldname = 'P_FILE'.
      MOVE sel_folder TO dynpfields-fieldvalue.
      APPEND dynpfields.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
        EXPORTING
          dyname     = dyname
          dynumb     = dynumb
        TABLES
          dynpfields = dynpfields.
    FORM disable.
      LOOP AT SCREEN.
        IF screen-group1 = 'ABC'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "dISABLE

    Hello Kiran,
    This is because you've defined the field as TYPE STRING.
    Change the declaration & the problem should be solved:
    PARAMETERS: p_file TYPE dynfieldvalue MODIF ID abc LOWER CASE .
    BR,
    Suhas

  • Tabular Forms - how to change the color of text when the field is disabled

    Hi,
    I have a tabular form and some of it's columns are disabled showing text in grey color...
    is there a way to change the color to black and bold the text...?
    thanks

    Okay, i've taken a look at your example.
    The column formatting does not work on the input fields. The help on the item says that it generates a span with a style attribute. This would work for a display field, not for an input field.
    Css like i've written should be in the style tags, put up in the header section of the page (page -> edit -> header region).
    You've already put script tags there, the style tags go there aswell. You shouldn't even need to put your script tags in the header region. Just put your code up in the javascript functions region (without the script tags).
    However, i tested in firefox and here color works on an input field, changing the font color. In IE it does not do this. Cross browser implementations and such, not much to do about it here. See http://stackoverflow.com/questions/602070/changing-font-colour-in-textboxes-in-ie-which-are-disabled.
    I did notice that you build your form with a bunch of input fields, which you disable through javascript in the footer of the region. Then on submit, you set the disabled to false again for all those fields! If you want those fields to always be submitted to the server, why wouldn't you use the readonly attribute? Readonly fields are always submitted, and can't be edited by the user. Plus, readonly fields CAN be styled however you want! You can get rid of the javascript code in your header then.
    Even the javascript in the footer is not necessary. If you just add 'readonly="true"' (without single quotes) to the element attributes of your items (edit column -> column attributes region) = no javascript at all (less maintenance).

  • How to change the input field's color in SE51

    Hi:
    I need to change the color of input fields in module pool.
    I tried to modify its screen-color but it did not work.
    Need your suggestion.
    Regards
    Shashi

    hi,
    Check this similar thread
    Regarding the input field color
    thanks

  • How can we change the input field on a view stop showing zeros

    Hello,
           To make screen look consistent with other character input field. How can we change the input field on the view stop displaying zeros even though the data type is NUMC and data type should not be change?
    Edited by: sap_learner on Mar 25, 2010 5:44 PM
    Edited by: sap_learner on Mar 25, 2010 5:49 PM
    Edited by: sap_learner on Mar 25, 2010 5:55 PM

    hello Manas Dua,
                           Thanks for your help. I am able to resolve my problem.
    My code will help  the future comers to resolve this kind of issues.
    *The code is applied to method WDDOINIT of the default view.
      DATA lo_nd_terms_input    TYPE REF TO if_wd_context_node.
      DATA lo_nd_terms_input_i TYPE REF TO if_wd_context_node_info.
      DATA lv_zeros             TYPE wdy_attribute_format_prop.
      lv_zeros-null_as_blank = 'X'.
      lo_nd_terms_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
      lo_nd_terms_input_i = lo_nd_terms_input->get_node_info( ).
      lo_nd_terms_input_i->set_attribute_format_props(
        EXPORTING
          name              = `ENTER THE ATTRIBUTE NAME`
          format_properties = lv_zeros     ).
    Edited by: sap_learner on Mar 26, 2010 5:02 PM

  • Is there a way to change the font size and color of text in the calendar app?

    Does anyone know a way of changing the font size and color of text in the calendar app that comes with the iPad 2?  It is very hard to see the small gray numbers on the calendar.  Thanks

    Looks like you didn't get a reply on your post, but it is still a problem.  Font size is supposedly changeable via "Accessibility" in Settings, but it doesn't work.  You can turn on "Zoom".

  • May I know how to change the color of texts inside the indicator box?

    Can anyone tell me how to change the color of texts inside the indicator box? I have tried to use property node but not really know how it functions.
    In fact, I am writing a program for which the number inside indicator on front panel will show red color if the measured value can't reach the requirement. I am using LabView 6.1 Professional
    Thank You for your attention!!!!!!

    Simply use a property node with "NumText.TextColor" and wire the correct color depending on your test result.
    The attached simple example (LV 6.1) lets you change it from the front panel. In your case, you would use your test output instead of a FP switch, of course. Message Edited by altenbach on 05-25-2005 09:05 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    TextColor.vi ‏18 KB

  • Append hyphen automatically after the wrapping of text in the dimension field

    Post Author: Nita_here
    CA Forum: WebIntelligence Reporting
    I want to Append hyphen automatically after the wrapping of text in the dimension field.
    e.g the text reads "I want to wrap this text". then if cell width exceeds after "I want to wrap" then it should be displayed like this "I want to wrap-" "this text".
    Thanks in advance,
    Nita

    Post Author: Nita_here
    CA Forum: WebIntelligence Reporting
    Thanks for your input.
    Let me tell you what I have understood. I will create a variable having the formula (which i have earlier written) in universe. Whenever i need to use the formula in infoview, I will call the variable instead. That's fine. But again, I will have the same problem. If I do any change in infoview level, the cell width is bound to change as it is not the free standing cell, its a column among othe one. e.g.
    A  B  C
    1  2  3
    4  5  6
    (you can think B as the column). Any change(addition, deletion of columns) will certainly change the cell width of B. So, again I need to calculate the things, which i dont want.
    Nita_here: I manually calculated that after 12 characters, the cell wraps the text.
    I wonder if there would be a way to do the things dynamically.
    Thanks in advance,
    Nita

  • Clearing the data buffer from the input fields

    Hi,
    I am using an user exit CONFPP02 for the Tcode: co11n. I have written a program such that the confirmation numbers having the status CNF will not be allowed to be processed. The whole confirmation is terminated when the system checks the confirmation number and its status as CNF. If the status of the confirmation number is PCNF, the program allows the further processing of the Tcode Co11n.
    The problem starts when the user enters the PCNF status confirmation number and enters, the system stores the values in the various input fields. Now without exiting the initial confirmation screen, if the user replaces the Confirmation number of the PCNF status to the Confirmation number of the CNF status , the system issues a warning message:"  Confirmation no. or order/sequence/operation has been changed
    However, the input fields still contain default values from thepreceding confirmation". if the user says yes, the program written is bypassed , thus allowing the reconfirmation of the CNF confirmation number  into PCNF confirmation number .
    Can anybody suggest a suitable method to clear the data stored defultly in the input fields so that the program can be made to work.
    With regards,
    Avinash.S
    Mobile no:09996192456

    Hi Gilad,
    I never use Preview and did not use Preview at all before sending the document over to my most recent client either.
    I only opened Preview up this morning after I discovered that all of the form data had disappeared on his end! And the only reason I opened up Preview was because I already knew it looked fine in Acrobat so wanted so wanted to view the form in a different application.
    My client would not even have notified me about it had he not sent the signed form back to me and I saw there was no data there! I then called him and asked him about the missing data and he said that he thought I had simply sent over the form purposely with blank fields:(
    I have just emailed him to ask him what application he opened it up in. My understanding is that he is on Windows because ne mentioned to me his company was using Windows when we last spoke. Perhaps he has a personal Macbook where he opened it? I just don't know and can hopefully soon find out:)
    But THANK YOU for letting me know about that script! I appreciate it:) I have now downloaded and installed it and will just have to use it on ALL of my forms before sending them out:)

  • In BSP how to give the input field as mandatory?

    Hi friends,
    In BSP how to give the input field as mandatory?
    In BSP i want to validate the input field (example checking the material no is valid or not)
    if this material no doesnot exit means i want to pass error message.What is the code for that.
    Moosa

    hi
    try this
    in LAYOUT
    <htmlb:inputField id = "vname"  disabled = "False" value = "<%= v_visitor %>"/> <font color="red" size="2"><b><%= page->messages->assert_message( 'vname' ) %></b></font></td>
    in DO_HANDLE_EVENT
    in oninputprocessing
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
      DATA: event TYPE REF TO CL_HTMLB_EVENT.
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event->name = 'button' AND event->event_type = 'click'.
        DATA: button_event TYPE REF TO CL_HTMLB_EVENT_BUTTON.
        button_event ?= event.
      ENDIF.
        case event->id.
            when 'select'.
               if v_visitor = ''.
                 page->messages->add_message(
                 condition = 'vname'
                 message   = 'Visitor Name can not be blank'
                 severity  = page->messages->CO_SEVERITY_ERROR ).
              ELSE.
                    here u can write ur when ur field getting filled
            endif.
         endcase.
    endif.
    give marks if it is helpful
    thanks

  • The list doesn't appear in the input field

    Hi All
    The list doesn't appear in the input field when I make input or press the BACKSPACE key.
    Notes:
    I made this modifications:
    1. In connection properties I set High speed connections (LAN)
    2. In local data settings I set the historial to ON
    we had SAPGUI 620 in workstations and now we have installed SAPGUI 710
    Thanks for your time and help
    Message was edited by:
            Genner Sanchez

    Hello Genner,
    see note 399180:
    o  FIELD NAME LENGTH
       The history is only written for field names with a maximum length
       of 40 characters. In earlier SAP GUI versions, this length was
       restricted to 30 characters. The history file must be deleted to
       achieve extended support.
    o  FIELD LENGTH
       If the length of the input field is 60 or more characters,
       history is not written either. "Input field length" refers to the
       dictionary length of the field, not to the "visible length" on
       the screen. (The restriction of the input data to 60 characters
       results from the fact that text editors were often built as lists
       of text fields with a length of 60 in the past. In those editors,
       this history was quite annoying.  On customer request, this was
    Regards, Martin

  • How to keep the input field from PDF Form to RTF

    Hi,
    I'm looking to keep the input fields from my pdf form document to Rtf so I can use them in my Rtf document.
    Regards,
    Alan

    Good day Alan,
    I'm afraid that's not possible as form fields in a PDF file have no equivalent either in a Word format (.docx/.doc) or within the Rich Text Format (.rtf).  That data is simply stripped during the conversion as there's no equivalent available.
    Kind regards,
    David
    Acrobat Community Manager
    Adobe Systems

  • How to change color of text is value is equal to 0

    how to change color of text or background if value is equal to 0

    HI,
    In Template Builder,Insert the conditional region,there you select the column and give condition is equal to 0 and in advanced enter the following code
    <?if:XMLfield=0?><xsl:attribute xdofo:ctx="block" name="background-color">red</xsl:attribute><?end if?>
    try this it works.
    Regards
    Uday

Maybe you are looking for