How to set cursor in a component by default

Hi all,
Does anybody know how to set the cursor inside a textArea? or at any particular component of a frame?
Thanks in advance.

textAreaObj.requestFocus() doesn't do it?
If that doesn't do it, then try textAreaObj.setSelectionStart(0).
You may have to force a repaint(), possibly, as well.

Similar Messages

  • How to set the fiscal year period as default in variables

    Hi All,
    How to set the fiscal year period as default it shoud take previous period when the report is executed.
    And also I need to do the same changes in reporting agent.
    Could you please any one help me.
    Points will be given.
    Thanks!
    Best regards,
    Ajay.

    Hi Ajay,
    Create a customer exit variable.Write the code in the include 'zxrsru01' using system date.
    take the system date from the system date variable and using that you can get the current fiscal year period.use this value and using string commands, you can get period.
    subtract 1 from this value.Using this you can get the previous fiscal period..
    Please let us know, if you need the coding part
    Hope it helps
    Thanks,
    Teja

  • TS1574 How do set my Built-in microphone to default?

    I am using a OS X Version 10.9.1 and i want to know how to set my Built-in Microphone to Default it's a simple question and no one seems to have an answer 

    Ok i can hear my voice now but the settings for the Built-in Microphone are not the same as before

  • How to set cursor property from "snap-to-plot" to free?

    dear all,
    is there any one know how to set a cursor property from "snap-to-plot" to "free"?
    this cursor is in a XY graphy
    i couldn't find coresponding property in the XY graph property node
    thank you
    Jack

    It looks like there are different property names depending on your labview version.
    You need to select the ActCrsr and then use the Cursor.Lockstyle property in LV7.1
    You need to select the ActCrsr and then use the Cursor.CursorMode property in LV8.2.

  • How to SET CURSOR FIELD my_field in my_REPORT_PROG.?

    Hi Experts,
    If the user do not enter a value in one field( NOT mandatory field) on the selection screen of my_report_prog. I wanna,
    1- To throw message - am getting by throwing as STATUS message
    2 - wanna keep CURSOR on that particlar field in order to input the value by the user - am using SET CURSOR FILED my_filed----
    > but NOT working????????
    So, pls. let me know that How to get it done?
    thanq

    hi,
    try the following code.you will get the cursor in the same field if you use status message or information message.
    selection-screen:begin of block b with frame title text-001.
    parameters:a type i.
    selection-screen:end of block b.
    at selection-screen.
    if a <> 3.
    message s000(0) with 'hi this is chaitu'.
    endif.
    after showing the message the cursor is at a.
    please rewards points if useful.

  • How to set cursor at the first line in a table control?

    Hi,
           I have a customized infotype screen where a table control is being used to input new values.The tab control has 30 lines.Now, the problem is that when the screen is displayed, the cursor always starts at 8th or 4th line.The behaviour is not very consistent.I tried the following statement in the PBO, but no effect.
    SET CURSOR FIELD P9417-ZCOUNTRY LINE 1.  ( P9417-ZCOUNTRY is the name of the tab control field where i want to set the cursor ).This is the last statement in the PBO.
    Can someone please tell me why still I am not able to set the cursor at the first line? I have infact noticed that , in the debugging mode , sometimes the cursor starts at the first line.Please help. Thanks

    I have got a new requirement on this now. If the table control does not have any records , then the cursor position should be on the first row.Otherwise, if it already has some records, then the cursor should be at the first empty row.I wrote the code like below.
    if sy-ucomm = 'INSERT'.
    set cursor 'P9714-ZCOUNTRY'  line 1.
    else if sy-ucomm eq 'CHANGE'.
    describe table itab lines fill.
    fill = fill + 1.
    set cursor 'P9714-ZCOUNTRY'  line fill.
    endif.
    I am facing a strange problem now.The table control has some 10 rows when you see the screen for the first time.If the number of records already present is less than 10, I am able to position the cursor on the first empty row.But if the number is say 15, then the cursor position goes to eighth or fourth line or sometimes the first line.
    Is there any way to display the last few records , ie, if there are 15 records , is there any way to display the last five rows when I see the screen for the first time, rather than showing the first 10 records?How can I position the cursor at the first empty row, when there are more records?
    Thanks in advance..good answers will be rewarded.
    Mahesh

  • How to set cursor after submit via selection-screen

    hi guys,
    i would like to set cursor to certain field, after submit via selection-screen.
    eg.
    SUBMIT   z_mm_kbr_gr_label_01
                VIA SELECTION-SCREEN
                WITH p_mblnr = p_mblnr
                WITH p_zeile = p_zeile
                WITH p_gjahr = p_gjahr
                WITH p_ccode = p_ccode
                WITH p_dcode = p_dcode
                WITH p_crt = p_crt
                WITH p_print = p_print.
    i want to set cursor field 'p_ccode' after going back to
    z_mm_kbr_gr_label_01. the program always go to the first field on the screen whatever i do.
    may i know how to do this?
    thanks.

    Hi,
    Please try like below .
    at selection-screen output.
    SET CURSOR FIELD  'P_CCODE' .

  • How to set Cursor position in ALV

    Hi,
    i have an issue that how can i set cursor in alv grid.
    i am using alv function modules.
    if user enters wrong info (i have one input enabled filed) then i must show this row as first row and place the cursor in that wrong entry column.
    does anybody worked on this kind of issue..?if so,plz send me the example code
    Thanks

    I think that you have to use OO ALV and use
    CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->set_current_cell_via_id
       EXPORTING
          IS_ROW_ID    =   <structure of type LVC_S_ROW > ( obsolete )
          IS_COLUMN_ID =   <structure of type LVC_S_COL >
          IS_ROW_NO    =   <structure of type LVC_S_ROID >.
    Hopefully, you can find the object reference of you REUSE ALV by using FM 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    (But i never try it)
    Regards.

  • Set cursor to a component

    hi, i am just wondering if anyone can tell me how can i actually place a cursor onto a certain component!
    thx in advance!

    You mean like cause the cursor to move to a specific spot on the screen? Or change the cursor icon when it isover a certain component. Either can be done, the first with the java.awt.Robot class and the second by just calling setCursor( Cursor ) on a component.

  • How to set cursor in table control?

    I have a table control (Screen 300) to display invoice number and amount. For some checks we have around 200 invoices to be displayed.  When user enters the invoice number in invoice text box and click on OK, it should highlight the invoice number and amount row or set the cursor position.
    I have another problem.
    Screen 300 is being called from Screen 200. When the user clicks on OK in 300, 300 is getting closed. Acutally it should be displayed with Cusor position or highlighted row.
    I appreaciate your help ... Thanks

    I believe that you can use the SET CURSOR statement to do the first part of your requirement.  Something like this should work:
    SET CURSOR FIELD w_field LINE w_line.
    Here's the info from SAP help:
    Effect
    : The cursor is positioned on the screen element whose name is contained in upper case in field. The data object field must be character-type and flat. The screen layout or a table control is scrolled in the display so that the screen element on which the cursor is positioned is visible. If the specified screen element is not found, the statement is ignored.
    If the specified screen element is part of a table control or a step loop, the line of the table control or group of the step loop in which the cursor is positioned on the specified screen element must be specified using the addition LINE. For the data object line, the type i is expected. If there is no line or group for the value of line, or the addition LINE is not specified, the statement is ignored. The statement is also ignored if the addition LINE is specified and the screen element is not part of a table control or step loop.
    I hope this helps.
    - April King

  • How to set cursor in perticular field Table Maintence generator?

    Hi
    All
    I have created a table with 2 fields  Start_date and End_date. Now my requirement is i have to validate the both date field as Start_Date must be LESS than or EQUAL to End_Date. In table maintenance maintenance generator i have created a event VALIDATE_DATE in event 21. Its validating perfectly. The issue is after the ERROR message the Cursor is going to the key field. I want to set the cursor at End_Date field.
    I used
    data:ly_pos type i.
    IF NOT start_date LE end_date.
        SET CURSOR FIELD 'TABLE_NAME-END_DATE' LINE sy-linno OFFSET lv_pos.
        MESSAGE exxx(MsgClass).
    ENDIF.
    Its working for the FIRST time i am entering the new data. Next time the cursor going to the KEY field.  I have been asked not to write code in SE80. Anyhow i have to set the cursor in table maintenance maintenance generator event.
    Can anybody help?

    Hi Sourav,
    Please follow the below method:
    Go to Maintainance Screen (where you want the cursor setting). Goto Status - > Remember the screen name -> Double click on Program name.. Open Object list and expant Screen Tree -> double click on the same screen Number -> Go to its first tab attributs -> Change Mode -> Do F4 on Cursor Position field -> Choose the field where you want the cursor.
    But this way will always set the cursor at the HardCoded Field Name.
    Thanks,
    Preyansh

  • How to Set up Print As Image Registry Default.

    This is a response to the archived post at:
    martin hrubes, "How to customize printing by registry - print as image" #, 6 Nov 2007 2:28 am
    I was trying to find out how to set the "Print As Image" advanced setting to be enabled by default. Here is what I discovered through trial and error.
    1. The setting is stored per user and per printer. (i.e. it has to be set for each printer for each user.)
    2. The registry setting is stored in the following key:
    [HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\8.0\General\cPrintAsImage]
    3. In this key, each printer has a separate binary value named s0, s1, s2, etc. The number increments by 1 for each printer added. If you open the value data, you will see it contains the name of the printer encoded in hex. (ex. hex coded for \\Server\Printer1)
    My recomendation is to open a pdf file in reader, go to File -> Print ->Select Desired Printer -> Click "Advanced" Options -> Enable "Print As Image" -> Click OK - Click OK again. Repeat for each printer you want to
    change.
    **NOTE** If you don't click OK both times (i.e. cancel the print dialog), the change will not be saved. You have to actually print something to the printer. If you don't want to print something, make sure the printer is offline or not accessible (unplug the network, usb, parallel, serial cable) first. Once the printer has been changed, it will keep the setting until to you change it.
    After you have set-up all of the desired printers, open RegEdit and navigate to the above key. Right click on it, and export it. Note the file name and location you are saving to. Close RegEdit. "Edit" (Right Click) the file just exported ("Opening" the file will just import it back into the registry.). Once opened, highlight and copy the registry key and all of the registry values. Paste the key and values at the end of the file. In one of the keys change "HKEY_CURRENT_USER\" to "HKEY_USERS\.DEFAULT\". Save and exit the file.
    When imported this file will enable the "Print As Image" setting for the currently logged in user plus add the setting to the default users profile so any new users to the machine will have it enabled by default also. However, it will not add it to any other user profiles that already exist on the computer. To do this, either use a login script for domain computers or add the reg file to the "All Users Startup" folder.
    It would be nice to have a setting in the deployment custimazation wizard to handle this, but for now we're stuck with enabling it the hard way.

    Yes Spyla, please see this link http://www.404techsupport.com/2008/09/09/make-adobe-reader-and-adobe-acrobat-use-print-as- image-setting-by-default-2/comment-page-1/#comment-3112.
    Allan, many thanks for your post, it certainly helped point me in the right direction.  what I found though is that you do not need to tick the print as image box at any point during the setting up of this.  All you need to do is add the registry key for whichever version of Adobe you are using for this to work.  So basically. what you are saying for each instance of Adobe is regardless of whether or not the print as image is selected, the registry key is saying always print as image for the printer as specified by the hex code. I have found that for network printers, you have to include the full path i.e. \\<servername>\<printername> e.g \\testserver\printer1 and convert all of that to hex. With later versions (9 up over), they have allowed for the string name of the printer so that it is just plain text which also makes life easier.
    What I do is apply this registry entry via Group Policy on a per room basis so that we only ever need to add one printer to the list.  you could do this globally by adding all printers sequentially using s0, s1, s2 or t0, t1, t2 etc depending on which version you are using.  The screenshot shows the registry key for 1 printer for Adobe Reader 8.
    The value data is the binary code for the actual full printer name
    This works a treat.
    Hope this helps
    Thanks

  • How to set up LOW QUALITY as a default in FlashPlayer plugin

    I don't have very fast computer. I would like to view all flashes on websites in LOW QUALITY. It is possible by right-clicking on a flash and changing the quality from HIGH to LOW. How to set up the FlashPlugin for Internet Explorer (8.0.6001.18702) that all flashes are displaying in LOW quality? I have FlashPlayer version 10.2.152.32

    http://forums.adobe.com/community/webplayers/flash_player

  • Linux FF34 - How to set sound levels to a lower default?

    The FEBE firefox extension plays a beep sound when it's backing up. My backup is at midnight on a Sunday and the PC is in another room, but the noise when it beeps nearly lifts the roof offo fo my house. Likewise, there are many sites where the site set the sound volume to a default Full Volume such as this one https://grabien.com/story.php?id=19088 (try it) and I see this:
    http://i.imgur.com/PVAhbYE.png << THe CubeUtils.
    It always starts off at MAX VOLUME. How do I change the default volume to always start at say 30%?

    You have my empathy!  This used to be obvious in versions before Mavericks.  Does Apple's silence on this mean they are becoming more Microsoft-like and removing convenient features?  That the question of 8 people has gone unanswered for 8 months is unconscionable.

  • How to set the show properties as  a default in KM

    Hello All,
    I am trying to upload the documents in KM repository using File-> Upload. If I click this Upload button, it will open a new window, it will show (show properties) this properties. But I want this one as default. Can any one help to set the (show properties) as a default? 
    Thanks in  Advance.

    Hi Gowsika,
    I'm sorry, but you seem not to get my explanation.
    First, there is no such "switch" for "Show Properties" or "Hide Properties", and there is also not Resource Type "Show Properties". It is hardcoded in the UICommand "upload" (so in the Screenflow implemented by com.sapportals.wcm.rendering.uicommand.cm.UIUploadCommand), that if the ResourceType "normalrt" (http://sap.com/xmlns/cm/framework/normal-resource-type) displayed "Normal Document" is selected, you will see the "Show Properties" link. Only by changing the implementation of this UICommand you could change this behavior, but it's not recommended because you have to make sure on upgrades that you don't overwrite it again.
    So again my suggestion:
    1. Go to KM->CM->Configuration->CM->Global Services->Resource Types
    2. Duplicate the Resouce Type "normalrt" changing:
      Name: my_normalrt
      Resource Type ID: http://sap.com/xmlns/cm/framework/my-normal-resource-type
    3. Go to KM->CM->Configuration->CM->Global Services->Property Structures->Property Structures
    4. Duplicate "DefaultPropertiesStructure" changing:
      Name: My_DefaultPropertiesStructure
      Resource Types: http://sap.com/xmlns/cm/framework/my-normal-resource-type
      Structure Items: "Input_here_your_properties_and_property_groups"
    BTW: If you want to have the same properties as in DefaultPropertiesStructure you might be obligated to remove some of them from the original Property Structure.
    5. Go to KM->CM->Configuration->CM->User Interface->Commands->UI Commands
    6. Duplicate "new_file" changing:
      Alias: my_upload
      Parameters: ResourceType=http://sap.com/xmlns/cm/framework/my-normal-resource-type,standalone=true
    7. Go to KM->CM->Configuration->CM->User Interface->Commands->UI Command Groups
    8. Edit AdminNewResourceGroup by renaming upload to my_upload in the "Commmand List" parameter.
    BTW: It's advisable to duplicate the whole Command Group and use it in your Layout Set and not to change the standard configuration, but I will not describe the whole process here
    9. Now go to KM Content and use the menu Folder->New...->Upload
    Hope this helps,
    Robert

Maybe you are looking for