2 Replies Latest reply: Apr 7, 2010 3:50 PM by 584436 RSS

    Copy region paste region -- is there a way to clear the paste buffer?

    584436
      Forms 10G R2

      I am using copy and paste built in functions and everything is working fine except that when i go through different records and even if they dont select anything from a list box then it still pasting it becuse it is storing the previous paste in the buffer. I have tried different things on when new record instance trigger to clear the buffer but it just stays there.
      Also is there a way to not show highlight ( a record highlight) i mean in a list box. It is a TList. Whats happening is whatever is selected on the first record gets highlighted and as you scroll throught the records it highlights that value in other records if it finds that value no matter what order.
      thanks

           :TEMP_BLOCK.SELECTED_KEYWORD:= :TEMP_BLOCK.source;
           GO_ITEM('TEMP_BLOCK.SELECTED_KEYWORD');
           SELECT_ALL;
           COPY_REGION;
           GO_ITEM('MESSAGE_FORMAT.different_item');
           PASTE_REGION;
        • 1. Re: Copy region paste region -- is there a way to clear the paste buffer?
          CraigB
          Forms uses the standard Clipboard Manager of the operating system to handle the value captured by the COPY/CUT_REGION and PASTE_REGION built-ins. There are no parameters to these built-ins to enable you to clear the contents of the Clipboard Manager. Therefore, I suggest you add a "Dummy" non-base table item to your form and set the height and width to 0 so it is not visble at run-time. Then modify your code to navigate to the "Dummy" item and call COPY_REGION - in affect nulling the value of the Clipboard Manager. For example:
          :TEMP_BLOCK.SELECTED_KEYWORD:= :TEMP_BLOCK.source;
          GO_ITEM('TEMP_BLOCK.SELECTED_KEYWORD');
          SELECT_ALL;
          COPY_REGION;
          GO_ITEM('MESSAGE_FORMAT.different_item');
          PASTE_REGION;
          
          /* Clear the Clipboard Manager */
          Go_Item('TEMP_BLOCK.DUMMY');
          Copy_Region;
          
          /* Make sure you navigate back to the previous */
          /* item so the user experience doesn't change. */
          GO_ITEM('MESSAGE_FORMAT.different_item');
          As to setting the "Current Record Visual Attribute" property of a TList - I'm not sure there is a native way to accomplish this. You might be able to do this with a Pluggable Java Component (PJC). Check out Oracle Forms PJCs/Java Beans web site for numerous PJC examples.

          Hope this helps.
          Craig....
          • 2. Re: Copy region paste region -- is there a way to clear the paste buffer?
            584436
            I have already tried that and trying it again . Yes when you think of it it should work, but it does not. You're missing SELECT_ALL.
            I am trying to handle it differently..Enabling disabling the buttons based on if they select a value or not. There is a blue line ( a blue highlight that shows up) when you select a value on the TLIST and as you move accross the records through scroll bar, the highlight jumps to that value on different record if there is one and if there is not that same value , then no highlight. is there a way to remove that highlight? thanks

            GO_ITEM('TEMP_BLOCK.ITEM65');
            SELECT_ALL;
            COPY_REGION;